Skip to content

Commit

Permalink
variable for datacenter
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Sep 18, 2024
1 parent 06bb9ca commit 2e9345c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e_test/datacenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestDatacenter(t *testing.T) {
require.EqualError(t, err, "datacenter not found: 123456")
assert.Empty(t, out)

out, err = runCommand(t, "datacenter", "describe", "2")
out, err = runCommand(t, "datacenter", "describe", TestDatacenterID)
require.NoError(t, err)
assert.Regexp(t, `ID:\s+[0-9]+
Name:\s+[a-z0-9\-]+
Expand Down
7 changes: 5 additions & 2 deletions e2e_test/variables.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ var (
// TestLoadBalancerType is the default Load Balancer type used in end-to-end tests.
TestLoadBalancerType = "lb11"

// TestDataCenter is the default datacenter where we execute our end-to-end tests.
TestDataCenter = getEnv("TEST_DATACENTER", "nbg1-dc3")
// TestDatacenterName is the default datacenter name where we execute our end-to-end tests.
TestDatacenterName = getEnv("TEST_DATACENTER_NAME", "nbg1-dc3")

// TestDatacenterID is the default datacenter ID where we execute our end-to-end tests (Must be the ID of TestDatacenterName)
TestDatacenterID = getEnv("TEST_DATACENTER_ID", "2")

// TestLocationName is the default location where we execute our end-to-end tests.
TestLocationName = getEnv("TEST_LOCATION", "nbg1")
Expand Down

0 comments on commit 2e9345c

Please sign in to comment.