Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove tests that cover or rely on creating Metal orgs
Browse files Browse the repository at this point in the history
As part of the end-of-sale for Equinix Metal, creation of new Equinix Metal
organizations has been disabled across the board.  Due to that change, tests
that use the `equinix_metal_organization` resource are guaranteed to fail.
ctreatma committed Jan 8, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent fa46d24 commit 3b12bee
Showing 4 changed files with 0 additions and 488 deletions.
72 changes: 0 additions & 72 deletions internal/resources/metal/organization/datasource_test.go

This file was deleted.

213 changes: 0 additions & 213 deletions internal/resources/metal/organization/resource_test.go

This file was deleted.

158 changes: 0 additions & 158 deletions internal/resources/metal/organization_member/resource_test.go

This file was deleted.

45 changes: 0 additions & 45 deletions internal/resources/metal/project/resource_test.go
Original file line number Diff line number Diff line change
@@ -365,51 +365,6 @@ resource "equinix_metal_project" "foobar" {
}`, r, pass)
}

func testAccMetalProjectConfig_organization(r string) string {
return fmt.Sprintf(`
resource "equinix_metal_organization" "test" {
name = "tfacc-project-%s"
address {
address = "tfacc org street"
city = "london"
zip_code = "12345"
country = "GB"
}
}
resource "equinix_metal_project" "foobar" {
name = "tfacc-project-%s"
organization_id = "${equinix_metal_organization.test.id}"
}`, r, r)
}

func TestAccMetalProject_organization(t *testing.T) {
var project metalv1.Project
rn := acctest.RandStringFromCharSet(12, "abcdef0123456789")

resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { acceptance.TestAccPreCheck(t) },
ExternalProviders: acceptance.TestExternalProviders,
ProtoV6ProviderFactories: acceptance.ProtoV6ProviderFactories,
CheckDestroy: testAccMetalProjectCheckDestroyed,
Steps: []resource.TestStep{
{
Config: testAccMetalProjectConfig_organization(rn),
Check: resource.ComposeTestCheckFunc(
testAccMetalProjectExists("equinix_metal_project.foobar", &project),
resource.TestCheckResourceAttr(
"equinix_metal_project.foobar", "name", fmt.Sprintf("tfacc-project-%s", rn)),
),
},
{
ResourceName: "equinix_metal_project.foobar",
ImportState: true,
ImportStateVerify: true,
},
},
})
}

func TestAccMetalProject_importBasic(t *testing.T) {
rInt := acctest.RandInt()

0 comments on commit 3b12bee

Please sign in to comment.