Skip to content

Commit

Permalink
add comment to clarify test rationale
Browse files Browse the repository at this point in the history
  • Loading branch information
letFunny committed Nov 25, 2024
1 parent 72b7e0b commit 16b49a7
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/setup/setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,12 @@ func (s *S) TestParseSliceKey(c *C) {
}
}

var yamlPathTests = []struct {
// This is an awkward test because right now the fact Generate is considered
// by SameContent is irrelevant to the implementation, because the code path
// happens to not touch it. More important than this test, there's an entry
// in setupTests that verifies that two packages with slices having
// {generate: manifest} in the same path are considered equal.
var yamlPathGenerateTests = []struct {
summary string
path1, path2 *setup.YAMLPath
result bool
Expand All @@ -2257,8 +2262,8 @@ var yamlPathTests = []struct {
result: false,
}}

func (s *S) TestYAMLPathSameContent(c *C) {
for _, test := range yamlPathTests {
func (s *S) TestYAMLPathGenerate(c *C) {
for _, test := range yamlPathGenerateTests {
c.Logf("Summary: %s", test.summary)
result := test.path1.SameContent(test.path2)
c.Assert(result, Equals, test.result)
Expand Down

0 comments on commit 16b49a7

Please sign in to comment.