Skip to content
Merged
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 internal/services/block/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestAccSnapshot_FromS3(t *testing.T) {
resource "scaleway_object" "qcow-object" {
bucket = scaleway_object_bucket.snapshot-bucket.name
key = "test-acc-block-snapshot.qcow2"
file = "testfixtures/small_image.qcow2"
file = "testfixture/small_image.qcow2"
}

resource "scaleway_block_snapshot" "qcow-block-snapshot" {
Expand Down
8 changes: 7 additions & 1 deletion internal/services/instance/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import (
)

func TestAccImage_BlockVolume(t *testing.T) {
t.Skip("Resources \"scaleway_instance_volume\" and \"scaleway_instance_snapshot\" are depracated")
// TestAccImage_ExternalBlockVolume should suffice to test the same logic with scaleway_block_volumes

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -213,7 +216,7 @@ func TestAccImage_Server(t *testing.T) {
ProviderFactories: tt.ProviderFactories,
CheckDestroy: resource.ComposeTestCheckFunc(
isImageDestroyed(tt),
isSnapshotDestroyed(tt),
blocktestfuncs.IsSnapshotDestroyed(tt),
instancechecks.IsServerDestroyed(tt),
),
Steps: []resource.TestStep{
Expand Down Expand Up @@ -278,6 +281,9 @@ func TestAccImage_Server(t *testing.T) {
}

func TestAccImage_ServerWithBlockVolume(t *testing.T) {
t.Skip("Resources \"scaleway_instance_volume\" and \"scaleway_instance_snapshot\" are depracated")
// TestAccImage_ServerWithSBSVolume should suffice to test the same logic with block volumes

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down
20 changes: 15 additions & 5 deletions internal/services/instance/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ func TestAccServer_RootVolume_Boot(t *testing.T) {
}

func TestAccServer_RootVolume_ID(t *testing.T) {
t.Skip("Resource \"scaleway_instance_volume\" is deprecated")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -545,6 +547,8 @@ EOF
}

func TestAccServer_AdditionalVolumes(t *testing.T) {
t.Skip("Resource \"scaleway_instance_volume\" is deprecated")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -621,6 +625,8 @@ func TestAccServer_AdditionalVolumes(t *testing.T) {
}

func TestAccServer_AdditionalVolumesDetach(t *testing.T) {
t.Skip("Resource \"scaleway_instance_volume\" is deprecated")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -1009,6 +1015,8 @@ func TestAccServer_AlterTags(t *testing.T) {
}

func TestAccServer_WithDefaultRootVolumeAndAdditionalVolume(t *testing.T) {
t.Skip("Resource \"scaleway_instance_volume\" is deprecated")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -1041,6 +1049,8 @@ func TestAccServer_WithDefaultRootVolumeAndAdditionalVolume(t *testing.T) {
}

func TestAccServer_ServerWithBlockNonDefaultZone(t *testing.T) {
t.Skip("Resource \"scaleway_instance_volume\" is deprecated")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -1714,21 +1724,21 @@ func TestAccServer_BlockExternal(t *testing.T) {
size_in_gb = 10
}

resource "scaleway_instance_volume" "volume" {
type = "b_ssd"
size_in_gb = 10
resource "scaleway_block_volume" "bigger-volume" {
iops = 15000
size_in_gb = 15
}

resource "scaleway_instance_server" "main" {
image = "ubuntu_jammy"
type = "PLAY2-PICO"
additional_volume_ids = [scaleway_block_volume.volume.id, scaleway_instance_volume.volume.id]
additional_volume_ids = [scaleway_block_volume.volume.id, scaleway_block_volume.bigger-volume.id]
}`,
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("scaleway_instance_server.main", "type", "PLAY2-PICO"),
resource.TestCheckResourceAttr("scaleway_instance_server.main", "additional_volume_ids.#", "2"),
resource.TestCheckResourceAttrPair("scaleway_instance_server.main", "additional_volume_ids.0", "scaleway_block_volume.volume", "id"),
resource.TestCheckResourceAttrPair("scaleway_instance_server.main", "additional_volume_ids.1", "scaleway_instance_volume.volume", "id"),
resource.TestCheckResourceAttrPair("scaleway_instance_server.main", "additional_volume_ids.1", "scaleway_block_volume.bigger-volume", "id"),
),
},
},
Expand Down
2 changes: 2 additions & 0 deletions internal/services/instance/snapshot_data_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
)

func TestAccDataSourceSnapshot_Basic(t *testing.T) {
t.Skip("Resources \"scaleway_instance_volume\" and \"scaleway_instance_snapshot\" are depracated")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()

Expand Down
11 changes: 10 additions & 1 deletion internal/services/instance/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
)

func TestAccSnapshot_BlockVolume(t *testing.T) {
t.Skip("Resource \"scaleway_instance_snapshot\" is depracated for block volumes")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -111,6 +113,8 @@ func TestAccSnapshot_Server(t *testing.T) {
}

func TestAccSnapshot_ServerWithBlockVolume(t *testing.T) {
t.Skip("Resource \"scaleway_instance_snapshot\" is depracated for block volumes")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -153,6 +157,8 @@ func TestAccSnapshot_ServerWithBlockVolume(t *testing.T) {
}

func TestAccSnapshot_RenameSnapshot(t *testing.T) {
t.Skip("Resource \"scaleway_instance_snapshot\" is depracated for block volumes")

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand Down Expand Up @@ -198,6 +204,9 @@ func TestAccSnapshot_RenameSnapshot(t *testing.T) {
}

func TestAccSnapshot_FromObject(t *testing.T) {
t.Skip("Resource \"scaleway_instance_snapshot\" is depracated")
// TestAccSnapshot_FromS3 tests the same logic on the scaleway_block_snapshot resource

tt := acctest.NewTestTools(t)
defer tt.Cleanup()
resource.ParallelTest(t, resource.TestCase{
Expand All @@ -217,7 +226,7 @@ func TestAccSnapshot_FromObject(t *testing.T) {
file = "testfixture/empty.qcow2"
}

resource "scaleway_instance_snapshot" "snapshot" {
resource "scaleway_block_snapshot" "snapshot" {
name = "test-instance-snapshot-import-from-object"
type = "b_ssd"
import {
Expand Down
Loading
Loading