Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
- name: Install dependencies
run: go mod tidy

- name: Run E2E tests with specified tag
- name: Run E2E tests with ${{ github.event.inputs.tag }}
run: |
go test ./... -v -timeout 6h -tags "${{ github.event.inputs.tag }}"

Expand Down
1 change: 1 addition & 0 deletions ionoscloud/data_source_servers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
const serverTestResource2 = constant.ServerTestResource + "2"

func TestAccDataSourceServersBasic(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() {
testAccPreCheck(t)
Expand Down
4 changes: 2 additions & 2 deletions ionoscloud/import_lan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ package ionoscloud

import (
"fmt"
"testing"

"github.com/ionos-cloud/terraform-provider-ionoscloud/v6/utils/constant"

"testing"

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
)

func TestAccLanImportBasic(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactoriesInternal(t, &testAccProvider),
Expand Down
4 changes: 2 additions & 2 deletions ionoscloud/import_nic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ package ionoscloud

import (
"fmt"
"testing"

"github.com/ionos-cloud/terraform-provider-ionoscloud/v6/utils/constant"

"testing"

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"
)

func TestAccNicImportBasic(t *testing.T) {
t.Parallel()
volumeName := "volume"

resource.Test(t, resource.TestCase{
Expand Down
2 changes: 2 additions & 0 deletions ionoscloud/import_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
)

func TestAccServerImportBasic(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ExternalProviders: randomProviderVersion343(),
Expand All @@ -35,6 +36,7 @@ func TestAccServerImportBasic(t *testing.T) {
}

func TestAccServerWithLabelsImport(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactoriesInternal(t, &testAccProvider),
Expand Down
4 changes: 3 additions & 1 deletion ionoscloud/import_server_vcpu_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ package ionoscloud

import (
"fmt"

"testing"

"github.com/hashicorp/terraform-plugin-testing/helper/resource"
"github.com/hashicorp/terraform-plugin-testing/terraform"

"github.com/ionos-cloud/terraform-provider-ionoscloud/v6/utils/constant"
)

func TestAccServerVCPUImportBasic(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ExternalProviders: randomProviderVersion343(),
Expand All @@ -35,6 +36,7 @@ func TestAccServerVCPUImportBasic(t *testing.T) {
}

func TestAccServerVCPUWithLabelsImport(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactoriesInternal(t, &testAccProvider),
Expand Down
3 changes: 3 additions & 0 deletions ionoscloud/resource_cube_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
const bootCdromImageIdCube = "83f21679-3321-11eb-a681-1e659523cb7b"

func TestAccCubeServerBasic(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -233,6 +234,7 @@ func TestAccCubeServerBasic(t *testing.T) {
// }

func TestAccCubeServerResolveImageName(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -297,6 +299,7 @@ func TestAccCubeServerResolveImageName(t *testing.T) {
// }

func TestAccCubeServerWithICMP(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down
1 change: 1 addition & 0 deletions ionoscloud/resource_datacenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
)

func TestAccDataCenterBasic(t *testing.T) {
t.Parallel()
var datacenter ionoscloud.Datacenter

resource.Test(t, resource.TestCase{
Expand Down
1 change: 1 addition & 0 deletions ionoscloud/resource_lan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
)

func TestAccLanBasic(t *testing.T) {
t.Parallel()
var lan ionoscloud.Lan
var privateLAN ionoscloud.Lan

Expand Down
1 change: 1 addition & 0 deletions ionoscloud/resource_nic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
)

func TestAccNicBasic(t *testing.T) {
t.Parallel()
var nic ionoscloud.Nic
name := "testNic"

Expand Down
2 changes: 1 addition & 1 deletion ionoscloud/resource_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func resourceServer() *schema.Resource {
StateContext: resourceServerImport,
},
CustomizeDiff: checkServerImmutableFields,

// Changes in schema should be kept in sync with changes in vcpu server. The vcpu server shares functions with this server resource.
Schema: map[string]*schema.Schema{
"template_uuid": {
Type: schema.TypeString,
Expand Down
9 changes: 9 additions & 0 deletions ionoscloud/resource_server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const bootCdromImageId = "aa97f2f4-ca28-11ec-925c-46570854dba1"
// ToDo: add backup unit back in tests when stable

func TestAccServerBasic(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -268,6 +269,7 @@ func TestAccServerBasic(t *testing.T) {

// issue #379 - also tests if a server can be created without a volume
func TestAccServerNoBootVolumeBasic(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -349,6 +351,7 @@ func TestAccServerNoBootVolumeBasic(t *testing.T) {

// tests server with no cdromimage and with multiple firewall rules inline
func TestAccServerBootCdromNoImageAndInlineFwRules(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -477,6 +480,7 @@ func TestAccServerBootCdromNoImageAndInlineFwRules(t *testing.T) {

// create and updates 5 inline rules after the server is created
func TestAccServerResolveImageNameAdd5FwRulesOnUpdate(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -612,6 +616,7 @@ func TestAccServerResolveImageNameAdd5FwRulesOnUpdate(t *testing.T) {

// also tests creating 5 fw rules inline
func TestAccServerWithSnapshotAnd5FwRulesInline(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -644,6 +649,7 @@ func TestAccServerWithSnapshotAnd5FwRulesInline(t *testing.T) {
}

func TestAccServerCubeServer(t *testing.T) {
t.Parallel()

var server ionoscloud.Server

Expand Down Expand Up @@ -681,6 +687,7 @@ func TestAccServerCubeServer(t *testing.T) {
}

func TestAccServerWithICMP(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -746,6 +753,7 @@ func TestAccServerWithICMP(t *testing.T) {
}

func TestAccServerWithLabels(t *testing.T) {
t.Parallel()
var server ionoscloud.Server

resource.Test(t, resource.TestCase{
Expand Down Expand Up @@ -804,6 +812,7 @@ func TestAccServerWithLabels(t *testing.T) {
}

func TestAccServerBootDeviceSelection(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() {
testAccPreCheck(t)
Expand Down
Loading
Loading