mirror of
https://github.com/smallstep/cli.git
synced 2025-04-19 10:42:15 +03:00
Fix tests for token flow having different error message
Depending on whether the test is executed in CI/VSCode vs. running them locally with `make test`, the resulting error message was different for the `multiple-select-ui` and `ignore-provisioner-flag` test cases. For now we just test for an error, but it would be nice to refactor a bit and trigger specific error cases in the future.
This commit is contained in:
parent
65cf93ec88
commit
b14f5534e0
@ -91,8 +91,7 @@ func TestProvisionerPromptPrompts(t *testing.T) {
|
||||
p2 := &provisioner.SCEP{Name: "scep"}
|
||||
|
||||
got, err := provisionerPrompt(clictx, []provisioner.Interface{p1, p2})
|
||||
require.Nil(t, got)
|
||||
require.ErrorContains(t, err, "error allocating terminal") // TODO(hs): would be nice to refactor to configurable output
|
||||
require.Error(t, err) // TODO(hs): would be nice to refactor to configurable output, and catch specific error cases (again)
|
||||
require.Nil(t, got)
|
||||
})
|
||||
|
||||
@ -158,7 +157,7 @@ func TestProvisionerPromptPrompts(t *testing.T) {
|
||||
p2 := &provisioner.OIDC{Name: "oidc-2", ClientID: "client-id-1"}
|
||||
|
||||
got, err := provisionerPrompt(clictx, []provisioner.Interface{p1, p2})
|
||||
require.ErrorContains(t, err, "error allocating terminal") // TODO(hs): would be nice to refactor to configurable output
|
||||
require.Error(t, err) // TODO(hs): would be nice to refactor to configurable output, and catch specific error cases (again)
|
||||
require.Nil(t, got)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user