Skip to content

Commit

Permalink
chore: unit tests fixes (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
shyam-cb authored Jun 21, 2024
1 parent 49280c4 commit 102493d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/dynamodb/action_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ var _ = Describe("mongo", func() {
dynamoDBRegionOption, dynamoDBRegion, dynamoDBCaBundleOption, dynamoDBCaBundle,
dynamoDBNoVerifySSLOption, cbClusterOption, cbCluster, cbUserOption, cbUser, cbPasswordOption,
cbPassword, cbBucketOption, cbBucket, cbScopeOption, cbScope)
Expect(err.Error()).To(Equal("error: \"--aws-profile\" is mutually exclusive with \"--aws-access-key\",\"aws-secret-key\" flags"))
Expect(err.Error()).To(Equal("error: \"--aws-profile\" is mutually exclusive with \"--aws-access-key-id\",\"aws-secret-access-key\" flags"))
})
It("exclusive error case 2", func() {
_, err := common.ExecuteCommand(cmd, dynamoDBTableNameOption, dynamoDBTableName,
Expand All @@ -249,7 +249,7 @@ var _ = Describe("mongo", func() {
dynamoDBRegionOption, dynamoDBRegion, dynamoDBCaBundleOption, dynamoDBCaBundle,
dynamoDBNoVerifySSLOption, cbClusterOption, cbCluster, cbUserOption, cbUser, cbPasswordOption,
cbPassword, cbBucketOption, cbBucket, cbScopeOption, cbScope)
Expect(err.Error()).To(Equal("error: \"--aws-profile\" is mutually exclusive with \"--aws-access-key\",\"aws-secret-key\" flags"))
Expect(err.Error()).To(Equal("error: \"--aws-profile\" is mutually exclusive with \"--aws-access-key-id\",\"aws-secret-access-key\" flags"))
})
It("must all error case 1", func() {
_, err := common.ExecuteCommand(cmd, dynamoDBTableNameOption, dynamoDBTableName,
Expand All @@ -258,7 +258,7 @@ var _ = Describe("mongo", func() {
dynamoDBRegionOption, dynamoDBRegion, dynamoDBCaBundleOption, dynamoDBCaBundle,
dynamoDBNoVerifySSLOption, cbClusterOption, cbCluster, cbUserOption, cbUser, cbPasswordOption,
cbPassword, cbBucketOption, cbBucket, cbScopeOption, cbScope)
Expect(err.Error()).To(Equal("inconsistent flag usage. Flags aws-access-key, aws-secret-key must all be provided together or not at all. Missing: aws-secret-key"))
Expect(err.Error()).To(Equal("inconsistent flag usage. Flags aws-access-key-id, aws-secret-access-key must all be provided together or not at all. Missing: aws-secret-access-key"))
})
It("must all error case 2", func() {
_, err := common.ExecuteCommand(cmd, dynamoDBTableNameOption, dynamoDBTableName,
Expand All @@ -267,7 +267,7 @@ var _ = Describe("mongo", func() {
dynamoDBRegionOption, dynamoDBRegion, dynamoDBCaBundleOption, dynamoDBCaBundle,
dynamoDBNoVerifySSLOption, cbClusterOption, cbCluster, cbUserOption, cbUser, cbPasswordOption,
cbPassword, cbBucketOption, cbBucket, cbScopeOption, cbScope)
Expect(err.Error()).To(Equal("inconsistent flag usage. Flags aws-access-key, aws-secret-key must all be provided together or not at all. Missing: aws-access-key"))
Expect(err.Error()).To(Equal("inconsistent flag usage. Flags aws-access-key-id, aws-secret-access-key must all be provided together or not at all. Missing: aws-access-key-id"))
})
})
})
Expand Down

0 comments on commit 102493d

Please sign in to comment.