test(e2e): Add test for when an incorrect tag is used in a dynamic host catalog (#2731)
* refact(e2e): Move Dynamic Host Catalog env to its own file This keeps each scenario consistent (an env_test.go file in each directory) * refact(e2e): Update to use type casting * refact(e2e): Rename existing dynamic host catalog test * test(e2e): Add test for an empty dynamic host catalog This test verifies that you fail to connect to a target with an empty host set (in a dynamic host catalog) * fix(e2e): Update return statement since we know err is nil * fix(e2e): Add ok checks in type assertions
This commit is contained in:
1 parent
1c9ca14a8e
commit
ff8f1be0a1
13 files changed
+189
-51
No files matched your search
@@ -273,7 +273,8 @@ func populateBoundaryDatabase(t testing.TB, ctx context.Context, c *config, te T
|
||||
var authenticationResult boundary.AuthenticateCliOutput
|
||||
err = json.Unmarshal(buf.Bytes(), &authenticationResult)
|
||||
require.NoError(t, err)
|
||||
auth_token := authenticationResult.Item.Attributes["token"].(string)
|
||||
auth_token, ok := authenticationResult.Item.Attributes["token"].(string)
|
||||
require.True(t, ok)
|
||||
|
||||
connectTarget := infra.ConnectToTarget(t, te.Pool, te.Network, te.Boundary.UriNetwork, auth_token, newTargetId)
|
||||
t.Cleanup(func() {
|
||||
|
||||
Reference in new issue
Block a user