feat: working helm template
This commit is contained in:
@@ -16,11 +16,26 @@ func TestCompile(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr))
|
||||
assert.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
_ = os.RemoveAll("test_data/dist")
|
||||
})
|
||||
|
||||
t.Run("can generate nginx helm chart", func(t *testing.T) {
|
||||
|
||||
_ = os.RemoveAll("test_data/dist/nginx")
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
_, err := daggerhelm.Compile(ctx, client, "test_data/nginx", "test_data/nginx.values.yaml")
|
||||
helmoutput, err := daggerhelm.Compile(ctx, client, "test_data/nginx", "test_data/nginx.values.yaml")
|
||||
|
||||
exported, err := helmoutput.Export(ctx, "test_data/dist")
|
||||
assert.NoError(t, err)
|
||||
assert.True(t, exported)
|
||||
|
||||
dir, err := os.ReadDir("test_data/dist/nginx/templates")
|
||||
|
||||
assert.NoError(t, err)
|
||||
|
||||
assert.Equal(t, 2, len(dir))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user