Skip to content

Commit

Permalink
improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
i4ki committed Dec 13, 2021
1 parent f5353f5 commit 6aca7d6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmd/terramate/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,19 @@ func TestBugModuleMultipleFilesSameDir(t *testing.T) {
mod3 := s.CreateModule(modname2)
mod3.CreateFile("main.tf", "# module 3")

// This issue is related to multiple files in the module directory and the
// order of the changed one is important, it should come first, with other
// files with module declarations skipped (module source not local).
// The files are named "1.tf" and "2.tf" because filepath.Walk() does a
// lexicographic walking of the files.
mod1 := s.CreateModule(modname1)
mod1.CreateFile("main.tf", `
mod1.CreateFile("1.tf", `
module "changed" {
source = %q
}
`, "../2")

mod1.CreateFile("secret.tf", `
mod1.CreateFile("2.tf", `
module "any" {
source = "anything"
}
Expand Down

0 comments on commit 6aca7d6

Please sign in to comment.