New ๐ŸŒŠ wave for @helm

Commit 041fce3c

041fce3ce1a4Merged

Svyatoslav Dumchenko <[email protected]> ยท 5 years ago ยท 1 file ยท ~1 modified

Description

update tests

Details

Commit
041fce3ce1a4
Parent
790e348b892d

pkg/release/plan_test.gomodifiedView file

@@ -121,6 +121,7 @@
121121 type args struct {
122122 tags []string
123123 enableDependencies bool
124+ matchAll bool
124125 planDependencies bool
125126 }
126127
@@ -178,14 +179,24 @@
178179 wantPlan: []*Config{},
179180 },
180181 {
181- name: "multiple tags",
182+ name: "multiple tags (with match all)",
182183 args: args{
183184 tags: []string{"1", "3"},
184185 enableDependencies: false,
186+ matchAll: true,
185187 },
186188 wantPlan: []*Config{releases[0]},
187189 },
188190 {
191+ name: "multiple tags (without match all)",
192+ args: args{
193+ tags: []string{"1", "3"},
194+ enableDependencies: false,
195+ matchAll: false,
196+ },
197+ wantPlan: releases,
198+ },
199+ {
189200 name: "nonexistent tag",
190201 args: args{
191202 tags: []string{"1231231"},
@@ -206,6 +217,7 @@
206217 t.Run(tt.name, func(t *testing.T) {
207218 feature.Dependencies = tt.args.enableDependencies
208219 feature.PlanDependencies = tt.args.planDependencies
220+ feature.MatchAllTags = tt.args.matchAll
209221
210222 gotPlan := Plan(tt.args.tags, releases)
211223 if len(gotPlan) == 0 && len(tt.wantPlan) == 0 {