@@ -661,7 +661,7 @@ func TestGenerateManifestsUseExactRevision(t *testing.T) {
661661
662662 res1 , err := service .GenerateManifest (context .Background (), & q )
663663 require .NoError (t , err )
664- assert .Len (t , res1 .Manifests , 6 )
664+ assert .Len (t , res1 .Manifests , 4 )
665665 assert .Equal (t , "abc" , gitClient .Calls [0 ].Arguments [0 ])
666666}
667667
@@ -677,7 +677,7 @@ func TestRecurseManifestsInDir(t *testing.T) {
677677
678678 res1 , err := service .GenerateManifest (context .Background (), & q )
679679 require .NoError (t , err )
680- assert .Len (t , res1 .Manifests , 6 )
680+ assert .Len (t , res1 .Manifests , 4 )
681681}
682682
683683func TestInvalidManifestsInDir (t * testing.T ) {
@@ -2199,7 +2199,7 @@ func TestFindResources(t *testing.T) {
21992199 }, {
22002200 name : "Include Everything" ,
22012201 include : "*.yaml" ,
2202- expectedNames : []string {"nginx-deployment" , "nginx-deployment" , "nginx-deployment -sub" },
2202+ expectedNames : []string {"nginx-deployment" , "nginx-deployment-sub" },
22032203 }, {
22042204 name : "Include Subdirectory" ,
22052205 include : "**/*.yaml" ,
@@ -2254,10 +2254,10 @@ func TestFindManifests_Exclude_NothingMatches(t *testing.T) {
22542254 }, map [string ]bool {}, resource .MustParse ("0" ))
22552255
22562256 require .NoError (t , err )
2257- require .Len (t , objs , 3 )
2257+ require .Len (t , objs , 2 )
22582258
22592259 assert .ElementsMatch (t ,
2260- []string {"nginx-deployment" , "nginx-deployment-sub" }, []string {objs [0 ].obj .GetName (), objs [2 ].obj .GetName ()})
2260+ []string {"nginx-deployment" , "nginx-deployment-sub" }, []string {objs [0 ].obj .GetName (), objs [1 ].obj .GetName ()})
22612261}
22622262
22632263func tempDir (t * testing.T ) string {
@@ -2606,7 +2606,7 @@ func Test_findManifests(t *testing.T) {
26062606 t .Run ("recursion when recursion is enabled" , func (t * testing.T ) {
26072607 recurse := argoappv1.ApplicationSourceDirectory {Recurse : true }
26082608 manifests , err := findManifests (logCtx , "./testdata/recurse" , "./testdata/recurse" , nil , recurse , nil , resource .MustParse ("0" ))
2609- assert .Len (t , manifests , 6 )
2609+ assert .Len (t , manifests , 4 )
26102610 require .NoError (t , err )
26112611 })
26122612
@@ -2665,7 +2665,7 @@ func Test_findManifests(t *testing.T) {
26652665 t .Run ("group of files should be limited at precisely the sum of their size" , func (t * testing.T ) {
26662666 // There is a total of 10 files, each file being 10 bytes.
26672667 manifests , err := findManifests (logCtx , "./testdata/several-files" , "./testdata/several-files" , nil , noRecurse , nil , resource .MustParse ("365" ))
2668- assert .Len (t , manifests , 55 )
2668+ assert .Len (t , manifests , 10 )
26692669 require .NoError (t , err )
26702670
26712671 manifests , err = findManifests (logCtx , "./testdata/several-files" , "./testdata/several-files" , nil , noRecurse , nil , resource .MustParse ("364" ))
@@ -2676,7 +2676,7 @@ func Test_findManifests(t *testing.T) {
26762676 t .Run ("jsonnet isn't counted against size limit" , func (t * testing.T ) {
26772677 // Each file is 36 bytes. Only the 36-byte json file should be counted against the limit.
26782678 manifests , err := findManifests (logCtx , "./testdata/jsonnet-and-json" , "./testdata/jsonnet-and-json" , nil , noRecurse , nil , resource .MustParse ("36" ))
2679- assert .Len (t , manifests , 3 )
2679+ assert .Len (t , manifests , 2 )
26802680 require .NoError (t , err )
26812681
26822682 manifests , err = findManifests (logCtx , "./testdata/jsonnet-and-json" , "./testdata/jsonnet-and-json" , nil , noRecurse , nil , resource .MustParse ("35" ))
0 commit comments