@@ -74,7 +74,6 @@ func TestCloudProviderAccessServiceOp_GetRole(t *testing.T) {
7474 mux .HandleFunc (fmt .Sprintf ("/api/atlas/v1.0/groups/1/cloudProviderAccess/%s" , roleID ), func (w http.ResponseWriter , r * http.Request ) {
7575 testMethod (t , r , http .MethodGet )
7676 fmt .Fprint (w , `{
77- "awsIamRoles": [{
7877 "atlasAWSAccountArn": "arn:aws:iam::123456789012:root",
7978 "atlasAssumedRoleExternalId": "3192be49-6e76-4b7d-a7b8-b486a8fc4483",
8079 "authorizedDate": "2020-08-03T20:42:49Z",
@@ -83,7 +82,6 @@ func TestCloudProviderAccessServiceOp_GetRole(t *testing.T) {
8382 "iamAssumedRoleArn": "arn:aws:iam::772401394250:role/my-test-aws-role",
8483 "providerName": "AWS",
8584 "roleId": "5f232b94af0a6b41747bcc2d"
86- }]
8785 }` )
8886 })
8987
@@ -92,19 +90,15 @@ func TestCloudProviderAccessServiceOp_GetRole(t *testing.T) {
9290 t .Fatalf ("CloudProviderAccess.GetRole returned error: %v" , err )
9391 }
9492
95- expected := & CloudProviderAccessRoles {
96- AWSIAMRoles : []AWSIAMRole {
97- {
98- AtlasAWSAccountARN : "arn:aws:iam::123456789012:root" ,
99- AtlasAssumedRoleExternalID : "3192be49-6e76-4b7d-a7b8-b486a8fc4483" ,
100- AuthorizedDate : "2020-08-03T20:42:49Z" ,
101- CreatedDate : "2020-07-30T20:20:36Z" ,
102- FeatureUsages : []* FeatureUsage {},
103- IAMAssumedRoleARN : "arn:aws:iam::772401394250:role/my-test-aws-role" ,
104- ProviderName : "AWS" ,
105- RoleID : "5f232b94af0a6b41747bcc2d" ,
106- },
107- },
93+ expected := & AWSIAMRole {
94+ AtlasAWSAccountARN : "arn:aws:iam::123456789012:root" ,
95+ AtlasAssumedRoleExternalID : "3192be49-6e76-4b7d-a7b8-b486a8fc4483" ,
96+ AuthorizedDate : "2020-08-03T20:42:49Z" ,
97+ CreatedDate : "2020-07-30T20:20:36Z" ,
98+ FeatureUsages : []* FeatureUsage {},
99+ IAMAssumedRoleARN : "arn:aws:iam::772401394250:role/my-test-aws-role" ,
100+ ProviderName : "AWS" ,
101+ RoleID : "5f232b94af0a6b41747bcc2d" ,
108102 }
109103 if diff := deep .Equal (roles , expected ); diff != nil {
110104 t .Error (diff )
0 commit comments