Skip to content

Commit

Permalink
test: fix template integ tests from integration tests (#3965)
Browse files Browse the repository at this point in the history
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
  • Loading branch information
dannyrandall authored Aug 30, 2022
1 parent f21b213 commit 9cdf694
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/pkg/config/store_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func Test_SSM_Environment_Integration(t *testing.T) {

store := config.NewSSMStore(identity.New(defaultSess), ssm.New(defaultSess), aws.StringValue(defaultSess.Config.Region))
applicationToCreate := config.Application{Name: randStringBytes(10), Version: "1.0"}
testEnvironment := config.Environment{Name: "test", App: applicationToCreate.Name, Region: "us-west-2", AccountID: " 1234", Prod: false}
prodEnvironment := config.Environment{Name: "prod", App: applicationToCreate.Name, Region: "us-west-2", AccountID: " 1234", Prod: true}
testEnvironment := config.Environment{Name: "test", App: applicationToCreate.Name, Region: "us-west-2", AccountID: " 1234"}
prodEnvironment := config.Environment{Name: "prod", App: applicationToCreate.Name, Region: "us-west-2", AccountID: " 1234"}

defer func() {
store.DeleteEnvironment(applicationToCreate.Name, testEnvironment.Name)
Expand Down
16 changes: 16 additions & 0 deletions internal/pkg/template/template_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
SubnetsType: template.PublicSubnetsPlacement,
},
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders with timeout and no retries": {
Expand All @@ -48,6 +49,7 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
},
ServiceDiscoveryEndpoint: "test.app.local",
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders with options": {
Expand All @@ -62,6 +64,7 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
},
ServiceDiscoveryEndpoint: "test.app.local",
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders with options and addons": {
Expand All @@ -81,6 +84,7 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
},
ServiceDiscoveryEndpoint: "test.app.local",
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders with Windows platform": {
Expand All @@ -95,6 +99,7 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
},
ServiceDiscoveryEndpoint: "test.app.local",
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
}
Expand Down Expand Up @@ -148,6 +153,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
},
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid grpc template by default": {
Expand All @@ -161,6 +167,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
},
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with addons with no outputs": {
Expand All @@ -176,6 +183,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
ServiceDiscoveryEndpoint: "test.app.local",
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with addons with outputs": {
Expand All @@ -194,6 +202,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
ServiceDiscoveryEndpoint: "test.app.local",
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with private subnet placement": {
Expand All @@ -206,6 +215,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
ServiceDiscoveryEndpoint: "test.app.local",
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with all storage options": {
Expand Down Expand Up @@ -246,6 +256,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
},
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with minimal storage options": {
Expand Down Expand Up @@ -281,6 +292,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
},
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with ephemeral storage": {
Expand All @@ -296,6 +308,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
},
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with entrypoint and command overrides": {
Expand All @@ -310,6 +323,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
},
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with additional addons parameters": {
Expand All @@ -326,6 +340,7 @@ DiscoveryServiceArn:
`,
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
"renders a valid template with Windows platform": {
Expand All @@ -342,6 +357,7 @@ DiscoveryServiceArn:
ServiceDiscoveryEndpoint: "test.app.local",
ALBEnabled: true,
CustomResources: customResources,
EnvVersion: "v1.42.0",
},
},
}
Expand Down

0 comments on commit 9cdf694

Please sign in to comment.