Skip to content

Commit

Permalink
Remove port from tests since port is not actually used on DSQL token
Browse files Browse the repository at this point in the history
  • Loading branch information
Madrigal committed Dec 10, 2024
1 parent 6b18784 commit eae1ff6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions feature/dsql/auth/auth_token_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,20 @@ type tokenGenFunc func(ctx context.Context, endpoint, region string, creds aws.C
func TestGenerateDbConnectAuthToken(t *testing.T) {
cases := map[string]dbTokenTestCase{
"no region": {
endpoint: "https://oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws:3306",
endpoint: "https://oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws",
expectedError: "no region",
},
"no endpoint": {
region: "us-west-2",
expectedError: "endpoint is required",
},
"endpoint with scheme": {
endpoint: "https://oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws:3306",
endpoint: "https://oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws",
region: "us-east-1",
expectedHost: "oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws:3306",
expectedHost: "oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws",
expectedQueryParams: []string{"Action=DbConnect"},
},
"endpoint without scheme": {
endpoint: "oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws:3306",
region: "us-east-1",
expectedHost: "oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws:3306",
expectedQueryParams: []string{"Action=DbConnect"},
},
"endpoint without port": {
endpoint: "oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws",
region: "us-east-1",
expectedHost: "oo0bar1baz2quux3quuux4.dsql.us-east-1.on.aws",
Expand Down

0 comments on commit eae1ff6

Please sign in to comment.