Skip to content

Commit

Permalink
Fix acceptance and integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed Jun 11, 2024
1 parent 2a110e2 commit 2ecad67
Show file tree
Hide file tree
Showing 77 changed files with 618 additions and 613 deletions.
10 changes: 5 additions & 5 deletions outscale/data_source_outscale_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ func TestAccOthers_SnapshotDataSource_basic(t *testing.T) {
{
Config: testAccCheckOutscaleOAPISnapshotDataSourceConfig(utils.GetRegion()),
Check: resource.ComposeTestCheckFunc(
testAccCheckOutscaleOAPISnapshotDataSourceID("data.outscale_snapshot.snapshot"),
resource.TestCheckResourceAttr("data.outscale_snapshot.snapshot", "volume_size", "1"),
testAccCheckOutscaleOAPISnapshotDataSourceID("data.outscale_snapshot.snpshot"),
resource.TestCheckResourceAttr("data.outscale_snapshot.snpshot", "volume_size", "1"),
),
},
},
Expand Down Expand Up @@ -66,12 +66,12 @@ func testAccCheckOutscaleOAPISnapshotDataSourceConfig(region string) string {
size = 1
}
resource "outscale_snapshot" "snapshot" {
resource "outscale_snapshot" "snapshot-basic" {
volume_id = outscale_volume.example.id
}
data "outscale_snapshot" "snapshot" {
snapshot_id = outscale_snapshot.snapshot.id
data "outscale_snapshot" "snpshot" {
snapshot_id = outscale_snapshot.snapshot-basic.id
}
`, region)
}
Expand Down
2 changes: 1 addition & 1 deletion outscale/resource_outscale_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func resourceOutscaleOAPISnapshotCreate(d *schema.ResourceData, meta interface{}
log.Printf("Waiting for Snapshot %s to become available...", resp.Snapshot.GetSnapshotId())

stateConf := &resource.StateChangeConf{
Pending: []string{"pending", "pending/queued", "queued", "importing"},
Pending: []string{"in-queue", "pending", "importing"},
Target: []string{"completed"},
Refresh: SnapshotOAPIStateRefreshFunc(conn, resp.Snapshot.GetSnapshotId()),
Timeout: OutscaleImageRetryTimeout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
"attributes": {
"api_access_rule_id": "##id-0##",
"ca_ids": [
"##id-1##",
"##id-2##"
"##id-2##",
"##id-1##"
],
"cns": [
"outscale-1",
Expand Down Expand Up @@ -193,10 +193,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-2##",
"ca_id": "##id-1##",
"ca_pem": "########",
"description": "",
"id": "##id-2##",
"id": "##id-1##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand All @@ -214,10 +214,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-1##",
"ca_id": "##id-2##",
"ca_pem": "########",
"description": "",
"id": "##id-1##",
"id": "##id-2##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-2##",
"ca_id": "##id-1##",
"ca_pem": "########",
"description": "",
"id": "##id-2##",
"id": "##id-1##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand All @@ -68,10 +68,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-1##",
"ca_id": "##id-2##",
"ca_pem": "########",
"description": "",
"id": "##id-1##",
"id": "##id-2##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202"
"test-TF202-2",
"test-TF202",
"outscale-1"
],
"description": "AAR-TF-202-1",
"description": "API Access rules-TF-202-1",
"ip_ranges": "########"
},
{
Expand All @@ -35,11 +36,10 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202",
"test-TF202-2"
"outscale-1"
],
"description": "API Access rules-TF-202-1",
"description": "AAR-TF-202-1",
"ip_ranges": "########"
}
],
Expand Down Expand Up @@ -68,10 +68,11 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202"
"test-TF202-2",
"test-TF202",
"outscale-1"
],
"description": "AAR-TF-202-1",
"description": "API Access rules-TF-202-1",
"ip_ranges": "########"
},
{
Expand All @@ -81,11 +82,10 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202",
"test-TF202-2"
"outscale-1"
],
"description": "API Access rules-TF-202-1",
"description": "AAR-TF-202-1",
"ip_ranges": "########"
}
],
Expand Down Expand Up @@ -114,10 +114,11 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202"
"test-TF202-2",
"test-TF202",
"outscale-1"
],
"description": "AAR-TF-202-1",
"description": "API Access rules-TF-202-1",
"ip_ranges": "########"
},
{
Expand All @@ -127,11 +128,10 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202",
"test-TF202-2"
"outscale-1"
],
"description": "API Access rules-TF-202-1",
"description": "AAR-TF-202-1",
"ip_ranges": "########"
}
],
Expand Down Expand Up @@ -160,10 +160,11 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202"
"test-TF202-2",
"test-TF202",
"outscale-1"
],
"description": "AAR-TF-202-1",
"description": "API Access rules-TF-202-1",
"ip_ranges": "########"
},
{
Expand All @@ -173,11 +174,10 @@
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202",
"test-TF202-2"
"outscale-1"
],
"description": "API Access rules-TF-202-1",
"description": "AAR-TF-202-1",
"ip_ranges": "########"
}
],
Expand All @@ -200,14 +200,14 @@
"attributes": {
"api_access_rules": [
{
"api_access_rule_id": "##id-0##",
"api_access_rule_id": "##id-3##",
"ca_ids": [
"##id-1##",
"##id-2##"
],
"cns": [
"outscale-1",
"test-TF202"
"test-TF202",
"outscale-1"
],
"description": "AAR-TF-202-1",
"ip_ranges": "########"
Expand All @@ -230,7 +230,7 @@
{
"schema_version": 0,
"attributes": {
"api_access_rule_id": "##id-3##",
"api_access_rule_id": "##id-0##",
"ca_ids": [
"##id-1##",
"##id-2##"
Expand All @@ -241,7 +241,7 @@
"test-TF202-2"
],
"description": "API Access rules-TF-202-1",
"id": "##id-3##",
"id": "##id-0##",
"ip_ranges": "########",
"request_id": "########"
},
Expand All @@ -263,7 +263,7 @@
{
"schema_version": 0,
"attributes": {
"api_access_rule_id": "##id-0##",
"api_access_rule_id": "##id-3##",
"ca_ids": [
"##id-1##",
"##id-2##"
Expand All @@ -273,7 +273,7 @@
"test-TF202"
],
"description": "AAR-TF-202-1",
"id": "##id-0##",
"id": "##id-3##",
"ip_ranges": "########",
"request_id": "########"
},
Expand All @@ -296,10 +296,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-1##",
"ca_id": "##id-2##",
"ca_pem": "########",
"description": "",
"id": "##id-1##",
"id": "##id-2##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand All @@ -317,10 +317,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-2##",
"ca_id": "##id-1##",
"ca_pem": "########",
"description": "",
"id": "##id-2##",
"id": "##id-1##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
{
"ca_fingerprint": "########",
"ca_id": "##id-0##",
"description": "test-TF199"
"description": "test-TF199-2"
},
{
"ca_fingerprint": "########",
"ca_id": "##id-1##",
"description": "test-TF199-2"
"description": "test-TF199"
}
],
"filter": "########",
Expand All @@ -47,12 +47,12 @@
{
"ca_fingerprint": "########",
"ca_id": "##id-0##",
"description": "test-TF199"
"description": "test-TF199-2"
},
{
"ca_fingerprint": "########",
"ca_id": "##id-1##",
"description": "test-TF199-2"
"description": "test-TF199"
}
],
"filter": "########",
Expand All @@ -73,10 +73,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-0##",
"ca_id": "##id-1##",
"ca_pem": "########",
"description": "test-TF199",
"id": "##id-0##",
"id": "##id-1##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand All @@ -94,10 +94,10 @@
"schema_version": 0,
"attributes": {
"ca_fingerprint": "########",
"ca_id": "##id-1##",
"ca_id": "##id-0##",
"ca_pem": "########",
"description": "test-TF199-2",
"id": "##id-1##",
"id": "##id-0##",
"request_id": "########"
},
"sensitive_attributes": [],
Expand Down
Loading

0 comments on commit 2ecad67

Please sign in to comment.