Skip to content

Commit

Permalink
test: change REGION_ID to variable
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian authored and peze committed Sep 28, 2023
1 parent 2fc4e24 commit b677049
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }}
REGION_ID: ${{ secrets.REGION_ID }}
REGION_ID: ${{ vars.REGION_ID }}
USER_ID: ${{ secrets.USER_ID }}
PUBLIC_KEY_ID: ${{ secrets.PUBLIC_KEY_ID }}
RSA_FILE_AES_KEY: ${{ secrets.RSA_FILE_AES_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion sdk/auth/credentials/providers/instance_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func TestInstanceMetadataProvider_Retrieve_Fail1(t *testing.T) {

_, err := NewInstanceMetadataProvider().Retrieve()
assert.NotNil(t, err)
assert.True(t, strings.Contains(err.Error(), "dial tcp: lookup invalid-domain-xxx:"))
assert.True(t, strings.Contains(err.Error(), "dial tcp: lookup invalid-domain-xxx"))
}

func TestInstanceMetadataProvider_Retrieve_Fail2(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion sdk/auth/signers/signer_ecs_ram_role_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func Test_EcsRamRoleSigner_GetAccessKeyId(t *testing.T) {
}()

accessKeyId, err := s.GetAccessKeyId()
assert.True(t, strings.Contains(err.Error(), "dial tcp: lookup invalid-domain-xxx:"))
assert.True(t, strings.Contains(err.Error(), "dial tcp: lookup invalid-domain-xxx"))
assert.Equal(t, "", accessKeyId)
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/auth/signers/signer_ram_role_arn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func Test_NewRamRoleArnSigner(t *testing.T) {
assert.Equal(t, 3600, signer.credentialExpiration)

c = credentials.NewRamRoleArnCredential("accessKeyId", "accessKeySecret", "roleArn", "", 100)
signer, err = NewRamRoleArnSigner(c, nil)
_, err = NewRamRoleArnSigner(c, nil)
assert.NotNil(t, err)
assert.Equal(t, "[SDK.InvalidParam] Assume Role session duration should be in the range of 15min - 1Hr", err.Error())
}
Expand Down

0 comments on commit b677049

Please sign in to comment.