Skip to content

Commit

Permalink
more nested testing
Browse files Browse the repository at this point in the history
  • Loading branch information
wildum committed Dec 21, 2023
1 parent e352a3a commit 7bf6914
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions pkg/flow/module_import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,71 @@ func TestImportModule(t *testing.T) {
}
`,
},
{
name: "TestDeclaredModuleUsedInImportedFileWithDepth3WithMoreNesting",
module: `
import.file "otherModule" {
filename = "other_module"
}
`,
otherModule: `
import.file "default" {
filename = "yet_another_module"
}
declare "anotherModule" {
testcomponents.count "inc" {
frequency = "10ms"
max = 10
}
declare "blabla" {
argument "input" {}
default.test "default" {
input = argument.input.value
}
export "output" {
value = default.test.default.output
}
}
blabla "default" {
input = testcomponents.count.inc.count
}
export "output" {
value = blabla.default.output
}
}
`,
yetAnotherModule: `
declare "test" {
argument "input" {
optional = false
}
testcomponents.passthrough "pt" {
input = argument.input.value
lag = "1ms"
}
export "output" {
value = testcomponents.passthrough.pt.output
}
}
`,
config: `
import.file "testImport" {
filename = "my_module"
}
testImport.otherModule.anotherModule "myOtherModule" {}
testcomponents.summation "sum" {
input = testImport.otherModule.anotherModule.myOtherModule.output
}
`,
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit 7bf6914

Please sign in to comment.