diff --git a/test/fixtures/download/remote-relative-with-slash/terragrunt.hcl b/test/fixtures/download/remote-relative-with-slash/terragrunt.hcl new file mode 100644 index 000000000..215c99b9b --- /dev/null +++ b/test/fixtures/download/remote-relative-with-slash/terragrunt.hcl @@ -0,0 +1,7 @@ +inputs = { + name = "World" +} + +terraform { + source = "github.com/gruntwork-io/terragrunt.git?ref=test%2Fdo-no-delete//test/fixture-download/relative" +} diff --git a/test/integration_download_test.go b/test/integration_download_test.go index a0de19c7f..3b15d0c1f 100644 --- a/test/integration_download_test.go +++ b/test/integration_download_test.go @@ -26,6 +26,7 @@ const ( testFixtureOverrideDonwloadPath = "fixtures/download/override" testFixtureLocalRelativeDownloadPath = "fixtures/download/local-relative" testFixtureRemoteRelativeDownloadPath = "fixtures/download/remote-relative" + testFixtureRemoteRelativeDownloadPathWithSlash = "fixtures/download/remote-relative-with-slash" testFixtureLocalWithBackend = "fixtures/download/local-with-backend" testFixtureLocalWithExcludeDir = "fixtures/download/local-with-exclude-dir" testFixtureLocalWithIncludeDir = "fixtures/download/local-with-include-dir" @@ -188,6 +189,17 @@ func TestRemoteDownloadWithRelativePath(t *testing.T) { helpers.RunTerragrunt(t, "terragrunt apply -auto-approve --terragrunt-non-interactive --terragrunt-working-dir "+testFixtureRemoteRelativeDownloadPath) } +func TestRemoteDownloadWithRelativePathAndSlashInBranch(t *testing.T) { + t.Parallel() + + helpers.CleanupTerraformFolder(t, testFixtureRemoteRelativeDownloadPathWithSlash) + + helpers.RunTerragrunt(t, "terragrunt apply -auto-approve --terragrunt-non-interactive --terragrunt-working-dir "+testFixtureRemoteRelativeDownloadPathWithSlash) + + // Run a second time to make sure the temporary folder can be reused without errors + helpers.RunTerragrunt(t, "terragrunt apply -auto-approve --terragrunt-non-interactive --terragrunt-working-dir "+testFixtureRemoteRelativeDownloadPathWithSlash) +} + func TestRemoteDownloadOverride(t *testing.T) { t.Parallel()