@@ -13,8 +13,9 @@ import (
1313)
1414
1515const (
16- testFixtureMixedConfig = "fixtures/mixed-config"
17- testFixtureFailFast = "fixtures/fail-fast"
16+ testFixtureMixedConfig = "fixtures/mixed-config"
17+ testFixtureFailFast = "fixtures/fail-fast"
18+ testFixtureRunnerPoolRemoteSource = "fixtures/runner-pool-remote-source"
1819)
1920
2021func TestRunnerPoolDiscovery (t * testing.T ) {
@@ -119,9 +120,13 @@ func TestRunnerPoolDestroyFailFast(t *testing.T) {
119120 tmpEnvPath := helpers .CopyEnvironment (t , testFixtureFailFast )
120121 testPath := util .JoinPath (tmpEnvPath , testFixtureFailFast )
121122
122- _ , _ , err := helpers .RunTerragruntCommandWithOutput (t , "terragrunt run --all --non-interactive --experiment runner-pool --fail-fast --working-dir " + testPath + " -- apply" )
123+ _ , stdout , err := helpers .RunTerragruntCommandWithOutput (t , "terragrunt run --all --non-interactive --experiment runner-pool --fail-fast --working-dir " + testPath + " -- apply" )
123124 require .NoError (t , err )
124125
126+ // Verify that there are no parsing errors in the output
127+ require .NotContains (t , stdout , "Error: Unsupported block type" )
128+ require .NotContains (t , stdout , "This object does not have an attribute named \" outputs\" " )
129+
125130 // create fail.txt in unit-a to trigger a failure
126131 helpers .CreateFile (t , testPath , "unit-b" , "fail.txt" )
127132 stdout , stderr , _ := helpers .RunTerragruntCommandWithOutput (t , "terragrunt run --all --non-interactive --experiment runner-pool --fail-fast --working-dir " + testPath + " -- destroy" )
@@ -147,3 +152,16 @@ func TestRunnerPoolDestroyDependencies(t *testing.T) {
147152 assert .Contains (t , stdout , "unit-a tf-path=" + wrappedBinary ()+ " msg=Destroy complete! Resources: 1 destroyed." )
148153
149154}
155+
156+ func TestRunnerPoolRemoteSource (t * testing.T ) {
157+ t .Parallel ()
158+
159+ helpers .CleanupTerraformFolder (t , testFixtureRunnerPoolRemoteSource )
160+ tmpEnvPath := helpers .CopyEnvironment (t , testFixtureRunnerPoolRemoteSource )
161+ testPath := util .JoinPath (tmpEnvPath , testFixtureRunnerPoolRemoteSource )
162+
163+ stdout , _ , err := helpers .RunTerragruntCommandWithOutput (t , "terragrunt run --all --non-interactive --log-level debug --experiment runner-pool --working-dir " + testPath + " -- apply" )
164+ require .NoError (t , err )
165+ // Verify that the output contains value produced from remote unit
166+ require .Contains (t , stdout , "data = \" unit-a\" " )
167+ }
0 commit comments