From 20fdfc85815479c0254ea5e18d4d17299227f466 Mon Sep 17 00:00:00 2001 From: rafalgalaw Date: Tue, 19 Dec 2023 08:12:02 +0100 Subject: [PATCH] fix: JIT config env var tests --- internal/provider/provider_test.go | 35 ++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/internal/provider/provider_test.go b/internal/provider/provider_test.go index 96134c5..c960587 100644 --- a/internal/provider/provider_test.go +++ b/internal/provider/provider_test.go @@ -82,17 +82,18 @@ func TestCreateInstance(t *testing.T) { }, }, bootstrapParams: params.BootstrapInstance{ - Name: instanceName, - PoolID: poolID, - Flavor: "small", - RepoURL: "https://github.com/testorg", - InstanceToken: "test-token", - MetadataURL: "https://metadata.test", - CallbackURL: "https://callback.test/status", - Image: "runner:ubuntu-22.04", - OSType: "linux", - OSArch: "arm64", - Labels: []string{"road-runner", "linux", "arm64", "kubernetes"}, + Name: instanceName, + PoolID: poolID, + Flavor: "small", + RepoURL: "https://github.com/testorg", + InstanceToken: "test-token", + MetadataURL: "https://metadata.test", + CallbackURL: "https://callback.test/status", + Image: "runner:ubuntu-22.04", + OSType: "linux", + OSArch: "arm64", + Labels: []string{"road-runner", "linux", "arm64", "kubernetes"}, + JitConfigEnabled: true, }, expectedProviderInstance: params.ProviderInstance{ ProviderID: providerID, @@ -204,6 +205,10 @@ func TestCreateInstance(t *testing.T) { Name: "CALLBACK_URL", Value: "https://callback.test/status", }, + { + Name: "JIT_CONFIG_ENABLED", + Value: "true", + }, }, VolumeMounts: []corev1.VolumeMount{ { @@ -386,6 +391,10 @@ func TestCreateInstance(t *testing.T) { Name: "CALLBACK_URL", Value: "https://callback.test/status", }, + { + Name: "JIT_CONFIG_ENABLED", + Value: "false", + }, }, VolumeMounts: []corev1.VolumeMount{ { @@ -544,6 +553,10 @@ func TestCreateInstance(t *testing.T) { Name: "CALLBACK_URL", Value: "https://callback.test/status", }, + { + Name: "JIT_CONFIG_ENABLED", + Value: "false", + }, }, VolumeMounts: []corev1.VolumeMount{ {