Skip to content

Commit

Permalink
fix: fix errors from rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Braun <rainbowstack@gmail.com>
  • Loading branch information
bluebrown committed Jul 14, 2023
1 parent 55f0752 commit a80e36f
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 206 deletions.
13 changes: 10 additions & 3 deletions internal/krm/renderer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func testPipe(caseDir string, opts testPipeOptions, events ...events.PushData) (
WithSelector(NewSelector(opts.resolvers, opts.associations)),
)

if _, err := rend.Render(context.Background(), ".testdata/"+caseDir, events); err != nil {
if _, err := rend.Render(context.Background(), "testdata/"+caseDir, events); err != nil {
return nil, err
}

Expand All @@ -46,6 +46,7 @@ func Test_renderer_Render(t *testing.T) {
tests := []struct {
name string
giveDir string
giveOpts testPipeOptions
giveEvents []events.PushData
wantSourceFieldValue map[string][]wantFieldValue
}{
Expand Down Expand Up @@ -220,6 +221,12 @@ func Test_renderer_Render(t *testing.T) {
{
name: "custom-resolver-helm",
giveDir: "custom-resolver-helm",
giveOpts: testPipeOptions{
resolvers: []kobold.ResolverSpec{
{Name: "my-helm", Paths: []string{"path.to.image", "another.path"}},
},
associations: []kobold.FileTypeSpec{{Kind: "my-helm", Pattern: "values.yaml"}},
},
giveEvents: []events.PushData{
{Image: "index.docker.io/bluebrown/echoserver", Tag: "latest", Digest: "sha256:3b3128d9df6bbbcc92e2358e596c9fbd722a437a62bafbc51607970e9e3b8869"},
{Image: "test.azurecr.io/nginx", Tag: "latest", Digest: "sha256:220611111e8c9bbe242e9dc1367c0fa89eef83f26203ee3f7c3764046e02b248"},
Expand All @@ -233,7 +240,7 @@ func Test_renderer_Render(t *testing.T) {
},
{
rnodeIndex: 0,
field: "another.path.somewhere",
field: "another.path",
value: "test.azurecr.io/nginx:latest@sha256:220611111e8c9bbe242e9dc1367c0fa89eef83f26203ee3f7c3764046e02b248",
},
},
Expand All @@ -245,7 +252,7 @@ func Test_renderer_Render(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()

fs, err := testPipe(tt.giveDir, tt.giveEvents...)
fs, err := testPipe(tt.giveDir, tt.giveOpts, tt.giveEvents...)
if err != nil {
t.Fatal(err)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ path:
image: docker.io/bluebrown/echoserver:latest # kobold: tag: latest; type: exact

another:
path:
somewhere: test.azurecr.io/nginx # kobold: tag: latest; type: exact
path: test.azurecr.io/nginx # kobold: tag: latest; type: exact
23 changes: 0 additions & 23 deletions internal/krm/testdata/helm/helm-chart/.helmignore

This file was deleted.

24 changes: 0 additions & 24 deletions internal/krm/testdata/helm/helm-chart/Chart.yaml

This file was deleted.

61 changes: 0 additions & 61 deletions internal/krm/testdata/helm/helm-chart/templates/deployment.yaml

This file was deleted.

82 changes: 0 additions & 82 deletions internal/krm/testdata/helm/helm-chart/values.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions internal/krm/testdata/helm/pod.yaml

This file was deleted.

0 comments on commit a80e36f

Please sign in to comment.