Commit 89be1c9c authored by Alex Collins's avatar Alex Collins
Browse files

fixes tests

parent d16f29f0
Showing with 11 additions and 4 deletions
+11 -4
......@@ -42,6 +42,7 @@ func newServiceWithMocks(root string) (*Service, *gitmocks.Client, *helmmocks.Cl
gitClient.On("CommitSHA").Return(mock.Anything, nil)
gitClient.On("Root").Return(root)
helmClient.On("CleanChartCache", mock.Anything, mock.Anything).Return(nil)
helmClient.On("ExtractChart", mock.Anything, mock.Anything).Return(func(chart string, version string) string {
return path.Join(root, chart)
}, util.NewCloser(func() error {
......@@ -240,8 +241,8 @@ func TestGenerateHelmWithValuesDirectoryTraversal(t *testing.T) {
func TestHelmManifestFromChartRepoWithValueFile(t *testing.T) {
service := newService(".")
source := &argoappv1.ApplicationSource{
Chart: "my-chart",
TargetRevision: ">= 1.0.0",
Chart: "./testdata/my-chart",
TargetRevision: "1.1.0",
Helm: &argoappv1.ApplicationSourceHelm{
ValueFiles: []string{"./my-chart-values.yaml"},
},
......@@ -264,8 +265,8 @@ func TestHelmManifestFromChartRepoWithValueFile(t *testing.T) {
func TestHelmManifestFromChartRepoWithValueFileOutsideRepo(t *testing.T) {
service := newService(".")
source := &argoappv1.ApplicationSource{
Chart: "my-chart",
TargetRevision: ">= 1.0.0",
Chart: "./testdata/my-chart",
TargetRevision: "1.0.0",
Helm: &argoappv1.ApplicationSourceHelm{
ValueFiles: []string{"../my-chart-2/my-chart-2-values.yaml"},
},
......
name: my-chart
version: 1.1.0
\ No newline at end of file
apiVersion: v1
kind: ConfigMap
metadata:
name: my-map
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment