Skip to content

Commit

Permalink
fix: Add Tests
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Ritter <[email protected]>
  • Loading branch information
l0wl3vel committed Dec 13, 2023
1 parent a8b084e commit 665aad6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions api/v1/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 665aad6

Please sign in to comment.