Skip to content

Commit 1aaa04f

Browse files
authored
fix: jit config env var tests (#13)
fixes added JitConfigEnabled in bootstrapParamas to be reflected in final pod env vars
1 parent ba2d981 commit 1aaa04f

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

internal/provider/provider_test.go

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,18 @@ func TestCreateInstance(t *testing.T) {
8282
},
8383
},
8484
bootstrapParams: params.BootstrapInstance{
85-
Name: instanceName,
86-
PoolID: poolID,
87-
Flavor: "small",
88-
RepoURL: "https://github.com/testorg",
89-
InstanceToken: "test-token",
90-
MetadataURL: "https://metadata.test",
91-
CallbackURL: "https://callback.test/status",
92-
Image: "runner:ubuntu-22.04",
93-
OSType: "linux",
94-
OSArch: "arm64",
95-
Labels: []string{"road-runner", "linux", "arm64", "kubernetes"},
85+
Name: instanceName,
86+
PoolID: poolID,
87+
Flavor: "small",
88+
RepoURL: "https://github.com/testorg",
89+
InstanceToken: "test-token",
90+
MetadataURL: "https://metadata.test",
91+
CallbackURL: "https://callback.test/status",
92+
Image: "runner:ubuntu-22.04",
93+
OSType: "linux",
94+
OSArch: "arm64",
95+
Labels: []string{"road-runner", "linux", "arm64", "kubernetes"},
96+
JitConfigEnabled: true,
9697
},
9798
expectedProviderInstance: params.ProviderInstance{
9899
ProviderID: providerID,
@@ -204,6 +205,10 @@ func TestCreateInstance(t *testing.T) {
204205
Name: "CALLBACK_URL",
205206
Value: "https://callback.test/status",
206207
},
208+
{
209+
Name: "JIT_CONFIG_ENABLED",
210+
Value: "true",
211+
},
207212
},
208213
VolumeMounts: []corev1.VolumeMount{
209214
{
@@ -386,6 +391,10 @@ func TestCreateInstance(t *testing.T) {
386391
Name: "CALLBACK_URL",
387392
Value: "https://callback.test/status",
388393
},
394+
{
395+
Name: "JIT_CONFIG_ENABLED",
396+
Value: "false",
397+
},
389398
},
390399
VolumeMounts: []corev1.VolumeMount{
391400
{
@@ -544,6 +553,10 @@ func TestCreateInstance(t *testing.T) {
544553
Name: "CALLBACK_URL",
545554
Value: "https://callback.test/status",
546555
},
556+
{
557+
Name: "JIT_CONFIG_ENABLED",
558+
Value: "false",
559+
},
547560
},
548561
VolumeMounts: []corev1.VolumeMount{
549562
{

0 commit comments

Comments
 (0)