@@ -20,13 +20,15 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
20
20
opts template.WorkloadOpts
21
21
}{
22
22
"renders a valid template by default" : {
23
- opts : template.WorkloadOpts {},
23
+ opts : template.WorkloadOpts {
24
+ ServiceDiscoveryEndpoint : "test.app.local" },
24
25
},
25
26
"renders with timeout and no retries" : {
26
27
opts : template.WorkloadOpts {
27
28
StateMachine : & template.StateMachineOpts {
28
29
Timeout : aws .Int (3600 ),
29
30
},
31
+ ServiceDiscoveryEndpoint : "test.app.local" ,
30
32
},
31
33
},
32
34
"renders with options" : {
@@ -35,6 +37,7 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
35
37
Retries : aws .Int (5 ),
36
38
Timeout : aws .Int (3600 ),
37
39
},
40
+ ServiceDiscoveryEndpoint : "test.app.local" ,
38
41
},
39
42
},
40
43
"renders with options and addons" : {
@@ -48,6 +51,7 @@ func TestTemplate_ParseScheduledJob(t *testing.T) {
48
51
SecretOutputs : []string {"TablePassword" },
49
52
PolicyOutputs : []string {"TablePolicy" },
50
53
},
54
+ ServiceDiscoveryEndpoint : "test.app.local" ,
51
55
},
52
56
},
53
57
}
@@ -81,7 +85,8 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
81
85
}{
82
86
"renders a valid template by default" : {
83
87
opts : template.WorkloadOpts {
84
- HTTPHealthCheck : defaultHttpHealthCheck ,
88
+ HTTPHealthCheck : defaultHttpHealthCheck ,
89
+ ServiceDiscoveryEndpoint : "test.app.local" ,
85
90
},
86
91
},
87
92
"renders a valid template with addons with no outputs" : {
@@ -90,6 +95,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
90
95
NestedStack : & template.WorkloadNestedStackOpts {
91
96
StackName : "AddonsStack" ,
92
97
},
98
+ ServiceDiscoveryEndpoint : "test.app.local" ,
93
99
},
94
100
},
95
101
"renders a valid template with addons with outputs" : {
@@ -101,6 +107,7 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
101
107
SecretOutputs : []string {"TablePassword" },
102
108
PolicyOutputs : []string {"TablePolicy" },
103
109
},
110
+ ServiceDiscoveryEndpoint : "test.app.local" ,
104
111
},
105
112
},
106
113
"renders a valid template with private subnet placement" : {
@@ -110,11 +117,13 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
110
117
AssignPublicIP : "DISABLED" ,
111
118
SubnetsType : "PrivateSubnets" ,
112
119
},
120
+ ServiceDiscoveryEndpoint : "test.app.local" ,
113
121
},
114
122
},
115
123
"renders a valid template with all storage options" : {
116
124
opts : template.WorkloadOpts {
117
- HTTPHealthCheck : defaultHttpHealthCheck ,
125
+ HTTPHealthCheck : defaultHttpHealthCheck ,
126
+ ServiceDiscoveryEndpoint : "test.app.local" ,
118
127
Storage : & template.StorageOpts {
119
128
Ephemeral : aws .Int (500 ),
120
129
EFSPerms : []* template.EFSPermission {
@@ -147,7 +156,8 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
147
156
},
148
157
"renders a valid template with minimal storage options" : {
149
158
opts : template.WorkloadOpts {
150
- HTTPHealthCheck : defaultHttpHealthCheck ,
159
+ HTTPHealthCheck : defaultHttpHealthCheck ,
160
+ ServiceDiscoveryEndpoint : "test.app.local" ,
151
161
Storage : & template.StorageOpts {
152
162
EFSPerms : []* template.EFSPermission {
153
163
{
@@ -175,17 +185,19 @@ func TestTemplate_ParseLoadBalancedWebService(t *testing.T) {
175
185
},
176
186
"renders a valid template with ephemeral storage" : {
177
187
opts : template.WorkloadOpts {
178
- HTTPHealthCheck : defaultHttpHealthCheck ,
188
+ HTTPHealthCheck : defaultHttpHealthCheck ,
189
+ ServiceDiscoveryEndpoint : "test.app.local" ,
179
190
Storage : & template.StorageOpts {
180
191
Ephemeral : aws .Int (500 ),
181
192
},
182
193
},
183
194
},
184
195
"renders a valid template with entrypoint and command overrides" : {
185
196
opts : template.WorkloadOpts {
186
- HTTPHealthCheck : defaultHttpHealthCheck ,
187
- EntryPoint : []string {"/bin/echo" , "hello" },
188
- Command : []string {"world" },
197
+ HTTPHealthCheck : defaultHttpHealthCheck ,
198
+ EntryPoint : []string {"/bin/echo" , "hello" },
199
+ Command : []string {"world" },
200
+ ServiceDiscoveryEndpoint : "test.app.local" ,
189
201
},
190
202
},
191
203
}
0 commit comments