Skip to content

Commit

Permalink
feat: Adding test for slash in source name (#3591)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhakbar authored Nov 22, 2024
1 parent edacae1 commit f3210dd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
inputs = {
name = "World"
}

terraform {
source = "github.com/gruntwork-io/terragrunt.git?ref=test%2Fdo-no-delete//test/fixture-download/relative"
}
12 changes: 12 additions & 0 deletions test/integration_download_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit f3210dd

Please sign in to comment.