Skip to content

Commit

Permalink
test: run e2e test on cax server type
Browse files Browse the repository at this point in the history
  • Loading branch information
jooola committed Jun 10, 2024
1 parent 9f9ad8a commit 59873eb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
26 changes: 13 additions & 13 deletions internal/servertype/data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func TestAccHcloudDataSourceServerTypeTest(t *testing.T) {
}
stByName.SetRName("st_by_name")
stByID := &servertype.DData{
ServerTypeID: "1",
ServerTypeID: "45",
}
stByID.SetRName("st_by_id")
resource.ParallelTest(t, resource.TestCase{
Expand All @@ -32,20 +32,20 @@ func TestAccHcloudDataSourceServerTypeTest(t *testing.T) {
),

Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(stByName.TFID(), "id", "1"),
resource.TestCheckResourceAttr(stByName.TFID(), "name", "cx11"),
resource.TestCheckResourceAttr(stByName.TFID(), "description", "CX11"),
resource.TestCheckResourceAttr(stByName.TFID(), "cores", "1"),
resource.TestCheckResourceAttr(stByName.TFID(), "memory", "2"),
resource.TestCheckResourceAttr(stByName.TFID(), "architecture", "x86"),
resource.TestCheckResourceAttr(stByName.TFID(), "id", "45"),
resource.TestCheckResourceAttr(stByName.TFID(), "name", "cax11"),
resource.TestCheckResourceAttr(stByName.TFID(), "description", "CAX11"),
resource.TestCheckResourceAttr(stByName.TFID(), "cores", "2"),
resource.TestCheckResourceAttr(stByName.TFID(), "memory", "4"),
resource.TestCheckResourceAttr(stByName.TFID(), "architecture", "arm"),
resource.TestCheckResourceAttr(stByName.TFID(), "included_traffic", "21990232555520"),

resource.TestCheckResourceAttr(stByID.TFID(), "id", "1"),
resource.TestCheckResourceAttr(stByID.TFID(), "name", "cx11"),
resource.TestCheckResourceAttr(stByID.TFID(), "description", "CX11"),
resource.TestCheckResourceAttr(stByID.TFID(), "cores", "1"),
resource.TestCheckResourceAttr(stByID.TFID(), "memory", "2"),
resource.TestCheckResourceAttr(stByID.TFID(), "architecture", "x86"),
resource.TestCheckResourceAttr(stByID.TFID(), "id", "45"),
resource.TestCheckResourceAttr(stByID.TFID(), "name", "cx22"),
resource.TestCheckResourceAttr(stByID.TFID(), "description", "CX22"),
resource.TestCheckResourceAttr(stByID.TFID(), "cores", "2"),
resource.TestCheckResourceAttr(stByID.TFID(), "memory", "4"),
resource.TestCheckResourceAttr(stByID.TFID(), "architecture", "arm"),
resource.TestCheckResourceAttr(stByID.TFID(), "included_traffic", "21990232555520"),
),
},
Expand Down
10 changes: 5 additions & 5 deletions internal/teste2e/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ import (

var (
// TestImage is the system image that is used in all tests
TestImage = getEnv("TEST_IMAGE", "ubuntu-22.04")
TestImage = getEnv("TEST_IMAGE", "ubuntu-24.04")

// TestImage is the system image ID that is used in all tests
TestImageID = getEnv("TEST_IMAGE_ID", "67794396")
TestImageID = getEnv("TEST_IMAGE_ID", "161547270")

// TestServerType is the default server type used in all tests
TestServerType = getEnv("TEST_SERVER_TYPE", "cx11")
TestServerType = getEnv("TEST_SERVER_TYPE", "cax11")

// TestServerTypeUpgrade is the upgrade server type used in all tests
TestServerTypeUpgrade = getEnv("TEST_SERVER_TYPE_UPGRADE", "cx21")
TestServerTypeUpgrade = getEnv("TEST_SERVER_TYPE_UPGRADE", "cax21")

// TestArchitecture is the default architecture used in all tests, should match the architecture of the TestServerType.
TestArchitecture = getEnv("TEST_ARCHITECTURE", string(hcloud.ArchitectureX86))
TestArchitecture = getEnv("TEST_ARCHITECTURE", string(hcloud.ArchitectureARM))

// TestLoadBalancerType is the default Load Balancer type used in all tests
TestLoadBalancerType = "lb11"
Expand Down
4 changes: 2 additions & 2 deletions internal/volume/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ func TestVolumeResource_WithServerMultipleVolumes(t *testing.T) {
tmplMan := testtemplate.Manager{}
resServer1 := &server.RData{
Name: "some-server",
Type: "cx11",
Image: "ubuntu-20.04",
Type: teste2e.TestServerType,
Image: teste2e.TestImage,
LocationName: teste2e.TestLocationName,
}
resServer1.SetRName("some-server")
Expand Down

0 comments on commit 59873eb

Please sign in to comment.