From 665aad6900c1aa2bd5d8e0a0fc6da8760a5480ee Mon Sep 17 00:00:00 2001 From: Benjamin Ritter Date: Wed, 13 Dec 2023 13:13:51 +0100 Subject: [PATCH] fix: Add Tests Signed-off-by: Benjamin Ritter --- api/v1/backend_test.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/v1/backend_test.go b/api/v1/backend_test.go index 498140ab4..5424eaffb 100644 --- a/api/v1/backend_test.go +++ b/api/v1/backend_test.go @@ -28,6 +28,21 @@ var tests = map[string]struct { }, expectedRepositoryString: "azure:container:/", }, + "GivenAzureBackendAndPath_ThenExpectAzureContainerWithCustomPath": { + givenBackend: &Backend{ + Azure: &AzureSpec{ + Container: "container", + Path: "foo", + AccountNameSecretRef: newSecretRef("name"), + AccountKeySecretRef: newSecretRef("key"), + }, + }, + expectedVars: map[string]*corev1.EnvVarSource{ + cfg.AzureAccountEnvName: {SecretKeyRef: newSecretRef("name")}, + cfg.AzureAccountKeyEnvName: {SecretKeyRef: newSecretRef("key")}, + }, + expectedRepositoryString: "azure:container:foo", + }, "GivenB2Backend_ThenExpectB2BucketAndPath": { givenBackend: &Backend{ B2: &B2Spec{