Skip to content

Commit

Permalink
chore: simplify the test
Browse files Browse the repository at this point in the history
  • Loading branch information
Azhovan committed Oct 10, 2023
1 parent 43a8983 commit a57b8ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
16 changes: 6 additions & 10 deletions apptests/kustomize/kustomize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ func TestBuild(t *testing.T) {
builder := New(
filepath.Join(wd, "testdata"),
map[string]string{
"name": "test-name",
"namespace": "kommander",
"name": "test",
"namespace": "test",
},
)
err = builder.Build()
Expand All @@ -26,15 +26,11 @@ func TestBuild(t *testing.T) {
assert.NoError(t, err)

// define the expected output
expected := `apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
expected := `apiVersion: apps/v1
kind: Deployment
metadata:
name: test-name
namespace: kommander
spec:
interval: 10m
timeout: 1m
url: https://charts.bitnami.com/bitnami/
name: test
namespace: test
`

assert.Equal(t, output, expected)
Expand Down
8 changes: 2 additions & 6 deletions apptests/kustomize/testdata/sample.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
---
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${name}
namespace: ${namespace}
spec:
interval: 10m
timeout: 1m
url: "${helmMirrorURL:=https://charts.bitnami.com/bitnami/}"

0 comments on commit a57b8ff

Please sign in to comment.