add test for using helm setFiles in skaffold.yaml
@@ -104,6 +104,20 @@ var testDeployConfigValuesFilesTemplated = latest.HelmDeploy{
}},
}
+var testDeployConfigSetFiles = latest.HelmDeploy{
+ Releases: []latest.HelmRelease{{
+ Name: "skaffold-helm",
+ ChartPath: "examples/test",
+ ArtifactOverrides: map[string]string{
+ "image": "skaffold-helm",
+ },
+ Overrides: schemautil.HelmOverrides{Values: map[string]interface{}{"foo": "bar"}},
+ SetFiles: map[string]string{
+ "value": "/some/file.yaml",
+ },
+ }},
+}
+
var testDeployRecreatePodsConfig = latest.HelmDeploy{
Releases: []latest.HelmRelease{{
Name: "skaffold-helm",
@@ -755,6 +769,17 @@ func TestHelmDeploy(t *testing.T) {
runContext: makeRunContext(testDeployConfigValuesFilesTemplated, false),
builds: testBuilds,
},
+ {
+ description: "deploy with setFiles",
+ commands: testutil.
+ CmdRunWithOutput("helm version --client", version20rc).
+ AndRun("helm --kube-context kubecontext get skaffold-helm --kubeconfig kubeconfig").
+ AndRun("helm --kube-context kubecontext dep build examples/test --kubeconfig kubeconfig").
+ AndRun("helm --kube-context kubecontext upgrade skaffold-helm examples/test -f skaffold-overrides.yaml --set-string image=docker.io:5000/skaffold-helm:3605e7bc17cf46e53f4d81c4cbc24e5b4c495184 --set-file value=/some/file.yaml --kubeconfig kubeconfig").
+ AndRun("helm --kube-context kubecontext get skaffold-helm --kubeconfig kubeconfig"),
+ runContext: makeRunContext(testDeployConfigSetFiles, false),
+ builds: testBuilds,
+ },
{
description: "deploy without actual tags",
commands: testutil.
