Skip to content

Commit

Permalink
Merge pull request #32 from srevinsaju/work/srevin/tests-nested-invoc…
Browse files Browse the repository at this point in the history
…ation

tests: add nested / recursive call invocation with failing sub pipeline
  • Loading branch information
srevinsaju authored Aug 21, 2023
2 parents 45377c9 + 3a94fd5 commit 09dd8fe
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/blocks/data/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (e *EnvProvider) DecodeBody(body hcl.Body) hcl.Diagnostics {

e.keyParsed = key.AsString()

attr, ok := content.Attributes["default"]
attr, ok := content.Attributes["default"]
if !ok {
e.def = ""
return diags
Expand Down
14 changes: 14 additions & 0 deletions tests/tests/failing/nested-failing-tests/nested.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
togomak {
version = 1
}

stage "test" {
script = "echo hello world"
}

stage "failing" {
depends_on = [
stage.test
]
script = "echo failed && exit 1"
}
20 changes: 20 additions & 0 deletions tests/tests/failing/nested-failing-tests/togomak.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
togomak {
version = 1
}

macro "nested" {
files = {
"togomak.hcl" : file("./nested.hcl")
}
}

stage "example" {
use {
macro = macro.nested
}
}

stage "another" {
depends_on = [stage.example]
script = "echo done"
}

0 comments on commit 09dd8fe

Please sign in to comment.