Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoandredinis authored and github-actions committed Dec 6, 2024
1 parent 6da83b7 commit 31a6d91
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
10 changes: 6 additions & 4 deletions lib/web/integrations_awsoidc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ func TestAWSOIDCAppAccessAppServerCreationDeletion(t *testing.T) {
myIntegration, err := types.NewIntegrationAWSOIDC(types.Metadata{
Name: "my-integration",
}, &types.AWSOIDCIntegrationSpecV1{
RoleARN: "some-arn-role",
RoleARN: "arn:aws:iam::123456789012:role/teleport",
})
require.NoError(t, err)

Expand All @@ -1009,7 +1009,8 @@ func TestAWSOIDCAppAccessAppServerCreationDeletion(t *testing.T) {
Kind: types.KindAppServer,
Version: types.V3,
Metadata: types.Metadata{
Name: "my-integration",
Name: "my-integration",
Labels: map[string]string{"aws_account_id": "123456789012"},
},
Spec: types.AppServerSpecV3{
Version: api.Version,
Expand All @@ -1018,7 +1019,8 @@ func TestAWSOIDCAppAccessAppServerCreationDeletion(t *testing.T) {
Kind: types.KindApp,
Version: types.V3,
Metadata: types.Metadata{
Name: "my-integration",
Name: "my-integration",
Labels: map[string]string{"aws_account_id": "123456789012"},
},
Spec: types.AppSpecV3{
URI: "https://console.aws.amazon.com",
Expand Down Expand Up @@ -1048,7 +1050,7 @@ func TestAWSOIDCAppAccessAppServerCreationDeletion(t *testing.T) {
myIntegrationWithAccountID, err := types.NewIntegrationAWSOIDC(types.Metadata{
Name: "123456789012",
}, &types.AWSOIDCIntegrationSpecV1{
RoleARN: "some-arn-role",
RoleARN: "arn:aws:iam::123456789012:role/teleport",
})
require.NoError(t, err)

Expand Down
6 changes: 5 additions & 1 deletion tool/tctl/common/resource_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1908,11 +1908,15 @@ func testCreateAppServer(t *testing.T, clt *authclient.Client) {
kind: app_server
metadata:
name: my-integration
labels:
account_id: "123456789012"
spec:
app:
kind: app
metadata:
name: my-integration
labels:
account_id: "123456789012"
spec:
uri: https://console.aws.amazon.com
integration: my-integration
Expand Down Expand Up @@ -1956,7 +1960,7 @@ version: v3
appServers := mustDecodeJSON[[]*types.AppServerV3](t, buf)
require.Len(t, appServers, 1)

expectedAppServer, err := types.NewAppServerForAWSOIDCIntegration("my-integration", "c6cfe5c2-653f-4e5d-a914-bfac5a7baf38", "integration.example.com")
expectedAppServer, err := types.NewAppServerForAWSOIDCIntegration("my-integration", "c6cfe5c2-653f-4e5d-a914-bfac5a7baf38", "integration.example.com", map[string]string{"account_id": "123456789012"})
require.NoError(t, err)
require.Empty(t, cmp.Diff(
expectedAppServer,
Expand Down

0 comments on commit 31a6d91

Please sign in to comment.