Skip to content

Commit

Permalink
Support darwin/arm64 in tests (#196)
Browse files Browse the repository at this point in the history
* fs: bump test version to 1.1.0 (for darwin/arm64 support)

* releases: add darwin/arm64 mock build

Re-Built as per instructions under releases/testdata/README.md
The older builds had to be rebuilt because of checksums & signature which are all contained in one file
and the checksums have changed for other builds because of newer version of Go.

* releases: bump version in TestExactVersion
  • Loading branch information
radeksimko committed Apr 23, 2024
1 parent 8093f09 commit 57f7cf1
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions fs/fs_test.go
Expand Up @@ -54,7 +54,7 @@ func TestVersion(t *testing.T) {
t.Setenv("PATH", p)
ev := releases.ExactVersion{
Product: product.Terraform,
Version: version.Must(version.NewVersion("1.0.0")),
Version: version.Must(version.NewVersion("1.1.0")),
InstallDir: p,
}
ev.SetLogger(testutil.TestLogger())
Expand All @@ -67,7 +67,7 @@ func TestVersion(t *testing.T) {
// Version matches constraint
v := &Version{
Product: product.Terraform,
Constraints: version.MustConstraints(version.NewConstraint(">= 1.0")),
Constraints: version.MustConstraints(version.NewConstraint(">= 1.1")),
}
v.SetLogger(testutil.TestLogger())
if _, err := v.Find(ctx); err != nil {
Expand Down Expand Up @@ -97,7 +97,7 @@ func TestVersion(t *testing.T) {
}

// Version mismatches constraint
v.Constraints = version.MustConstraints(version.NewConstraint("> 1.0"))
v.Constraints = version.MustConstraints(version.NewConstraint("> 1.1"))
if _, err := v.Find(ctx); err == nil {
t.Fatal("expecting error")
}
Expand Down
2 changes: 1 addition & 1 deletion releases/releases_test.go
Expand Up @@ -125,7 +125,7 @@ func TestLatestVersion_prereleases(t *testing.T) {
func TestExactVersion(t *testing.T) {
testutil.EndToEndTest(t)

versionToInstall := version.Must(version.NewVersion("0.14.0"))
versionToInstall := version.Must(version.NewVersion("1.1.0"))
ev := &ExactVersion{
Product: product.Terraform,
Version: versionToInstall,
Expand Down
Expand Up @@ -612,6 +612,14 @@
"filename": "terraform_0.15.0-rc2_darwin_amd64.zip",
"url": "https://releases.hashicorp.com/terraform/0.15.0-rc2/terraform_0.15.0-rc2_darwin_amd64.zip"
},
{
"name": "terraform",
"version": "0.15.0-rc2",
"os": "darwin",
"arch": "arm64",
"filename": "terraform_0.15.0-rc2_darwin_arm64.zip",
"url": "https://releases.hashicorp.com/terraform/0.15.0-rc2/terraform_0.15.0-rc2_darwin_arm64.zip"
},
{
"name": "terraform",
"version": "0.15.0-rc2",
Expand Down
@@ -1,3 +1,4 @@
518baaa2b8926bf704d5f72f50631b46f598fb883da6691dd5523091ed54bae3 terraform_0.15.0-rc2_darwin_amd64.zip
d4ede4731c2d5f30d786cb9a28004d77037b0bc25e3343e82536509b4dd8d13c terraform_0.15.0-rc2_linux_amd64.zip
eb6c292c28058fd0aea75ef1a14cda16fa817c3e5bd0df08cd74d565eb556bcf terraform_0.15.0-rc2_windows_amd64.zip
d432b9722de43e89bb1568344b47c707348025d809765817ece2e46cd0d7b24d terraform_0.15.0-rc2_darwin_amd64.zip
6b6bf2497aefbef79076bde41a0718b72e9adabb3e33fafc45e9494546199e43 terraform_0.15.0-rc2_darwin_arm64.zip
44dfce5c083a9187393262a5071e21e55d1c38dc4bd2a6c5284ae7924974be8a terraform_0.15.0-rc2_linux_amd64.zip
14a5acf8b7dd8c6947e6af633e7962f0d4974c4ac0eb0fcefb1ff43db829ea1f terraform_0.15.0-rc2_windows_amd64.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 57f7cf1

Please sign in to comment.