Skip to content

Commit

Permalink
chore: fix loader tests to point to reference
Browse files Browse the repository at this point in the history
It looks like the TFC registry has changed to point to the commit ref instead of the tag
  • Loading branch information
aliscott committed Jan 24, 2024
1 parent 4ccc338 commit 702094c
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions internal/hcl/modules/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ func TestNestedModules(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "registry-module-different-name",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "git-module",
Expand Down Expand Up @@ -119,7 +119,7 @@ func TestNestedModules(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
}, TestLoaderE2EOpts{Cleanup: true})
}
Expand All @@ -135,14 +135,14 @@ func TestSubmodules(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/route53/aws//modules/zones",
Version: "2.5.0",
Dir: ".infracost/terraform_modules/d1e3bab8b33f57431ace737ccffbf67f/modules/zones",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=v2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=97dfbae914056b1a06c213be5d5834bc7eea8433",
},
{
Key: "registry-submodule-records",
Source: "registry.terraform.io/terraform-aws-modules/route53/aws//modules/records",
Version: "2.5.0",
Dir: ".infracost/terraform_modules/d1e3bab8b33f57431ace737ccffbf67f/modules/records",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=v2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=97dfbae914056b1a06c213be5d5834bc7eea8433",
},
{
Key: "git-submodule",
Expand All @@ -163,14 +163,14 @@ func TestModuleMultipleUses(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "registry-module-2",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
}, TestLoaderE2EOpts{Cleanup: true})
}
Expand All @@ -186,14 +186,14 @@ func TestModuleMultipleUsesMissingManifest(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "registry-module-2",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
}

Expand Down Expand Up @@ -221,7 +221,7 @@ func TestWithCachedModules(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "git-module",
Expand Down Expand Up @@ -288,14 +288,14 @@ func TestMultiProject(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "registry-module-different-name",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "git-module",
Expand Down Expand Up @@ -324,7 +324,7 @@ func TestMultiProject(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
})

Expand All @@ -334,14 +334,14 @@ func TestMultiProject(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "registry-module-different-name",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
{
Key: "git-module",
Expand Down Expand Up @@ -375,7 +375,7 @@ func TestMultiProject(t *testing.T) {
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
Dir: ".infracost/terraform_modules/f8b5f5ddb85ee755b31c8b76d2801f5b",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
})

Expand Down Expand Up @@ -439,7 +439,7 @@ func TestSourceMapRegistryModule(t *testing.T) {
Key: "registry-module",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
},
},
Expand Down Expand Up @@ -482,7 +482,7 @@ func TestSourceMapRegistryModule(t *testing.T) {
Key: "registry-module",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
},
},
Expand All @@ -496,7 +496,7 @@ func TestSourceMapRegistryModule(t *testing.T) {
Key: "registry-module",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
},
},
Expand Down Expand Up @@ -527,7 +527,7 @@ func TestSourceMapRegistrySubmodule(t *testing.T) {
Key: "registry-submodule",
Source: "registry.terraform.io/terraform-aws-modules/route53/aws//modules/zones",
Version: "2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=v2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=97dfbae914056b1a06c213be5d5834bc7eea8433",
},
},
},
Expand Down Expand Up @@ -570,7 +570,7 @@ func TestSourceMapRegistrySubmodule(t *testing.T) {
Key: "registry-submodule",
Source: "registry.terraform.io/terraform-aws-modules/route53/aws//modules/zones",
Version: "2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=v2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=97dfbae914056b1a06c213be5d5834bc7eea8433",
},
},
},
Expand All @@ -584,7 +584,7 @@ func TestSourceMapRegistrySubmodule(t *testing.T) {
Key: "registry-submodule",
Source: "registry.terraform.io/terraform-aws-modules/route53/aws//modules/zones",
Version: "2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=v2.5.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-route53?ref=97dfbae914056b1a06c213be5d5834bc7eea8433",
},
},
},
Expand Down Expand Up @@ -682,7 +682,7 @@ func TestSourceMapGitModule(t *testing.T) {
Key: "git-module",
Source: "registry.terraform.io/terraform-aws-modules/ec2-instance/aws",
Version: "3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=v3.4.0",
DownloadURL: "git::https://github.com/terraform-aws-modules/terraform-aws-ec2-instance?ref=ab731d112e37971368066b5dbecf35b075a853aa",
},
},
},
Expand Down Expand Up @@ -765,7 +765,7 @@ func TestSourceMapGitSubmodule(t *testing.T) {
want: []*ManifestModule{
{
Key: "git-submodule",
Source: "git::https://github.com/infracost-tests/terraform-aws-route53.git//modules/zones?ref=v2.5.0",
Source: "git::https://github.com/infracost-tests/terraform-aws-route53.git//modules/zones?ref=97dfbae914056b1a06c213be5d5834bc7eea8433",
Version: "",
},
},
Expand Down

0 comments on commit 702094c

Please sign in to comment.