Skip to content

Commit 826e50c

Browse files
committed
core test changes to fix CI runs
1 parent 6791513 commit 826e50c

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

oci/core_instance_resource_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,10 @@ func (s *ResourceCoreInstanceTestSuite) TestAccResourceCoreInstance_preserveBoot
903903
},
904904
),
905905
},
906+
// to verify reattaching to the old boot volume resource should be terminated before the waiting for boot volume condition
907+
{
908+
Config: s.Config,
909+
},
906910
// ForceNew an instance by changing hostname_label and try reattach to the old boot volume,
907911
// We didn't set preserve flag in the previous step, so the boot volume should be deleted and
908912
// this should result in an error from service.

oci/core_shape_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var (
2222
shapeResourceRepresentation = map[string]interface{}{
2323
"compartment_id": Representation{repType: Required, create: `${var.compartment_id}`},
2424
"image_id": Representation{repType: Required, create: `${oci_core_image.test_image.id}`},
25-
"shape_name": Representation{repType: Required, create: `VM.Standard.B1.1`},
25+
"shape_name": Representation{repType: Required, create: `VM.Standard.E2.1`},
2626
}
2727

2828
ShapeResourceConfig = OciImageIdsVariable +
@@ -61,7 +61,7 @@ func TestCoreShapeResource_basic(t *testing.T) {
6161
generateResourceFromRepresentationMap("oci_core_shape_management", "test_shape", Required, Create, shapeResourceRepresentation),
6262
Check: resource.ComposeAggregateTestCheckFunc(
6363
resource.TestCheckResourceAttrSet(resourceName, "image_id"),
64-
resource.TestCheckResourceAttr(resourceName, "shape_name", "VM.Standard.B1.1"),
64+
resource.TestCheckResourceAttr(resourceName, "shape_name", "VM.Standard.E2.1"),
6565
),
6666
},
6767
// verify Delete Compatible Image Shape

oci/core_volume_attachment_resource_test.go

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,14 @@ func (s *ResourceCoreVolumeAttachmentTestSuite) SetupTest() {
4747
security_list_ids = ["${oci_core_virtual_network.t.default_security_list_id}"]
4848
}
4949
50-
variable "InstanceImageOCID" {
51-
type = "map"
52-
default = {
53-
// See https://docs.us-phoenix-1.oraclecloud.com/images/
54-
// Oracle-provided image "Oracle-Linux-7.5-2018.10.16-0"
55-
us-phoenix-1 = "ocid1.image.oc1.phx.aaaaaaaadjnj3da72bztpxinmqpih62c2woscbp6l3wjn36by2cvmdhjub6a"
56-
us-ashburn-1 = "ocid1.image.oc1.iad.aaaaaaaawufnve5jxze4xf7orejupw5iq3pms6cuadzjc7klojix6vmk42va"
57-
eu-frankfurt-1 = "ocid1.image.oc1.eu-frankfurt-1.aaaaaaaagbrvhganmn7awcr7plaaf5vhabmzhx763z5afiitswjwmzh7upna"
58-
uk-london-1 = "ocid1.image.oc1.uk-london-1.aaaaaaaajwtut4l7fo3cvyraate6erdkyf2wdk5vpk6fp6ycng3dv2y3ymvq"
59-
}
60-
}
61-
6250
resource "oci_core_instance" "t" {
6351
availability_domain = "${data.oci_identity_availability_domains.ADs.availability_domains.0.name}"
6452
compartment_id = "${var.compartment_id}"
6553
display_name = "-tf-instance"
6654
image = "${var.InstanceImageOCID[var.region]}"
6755
shape = "VM.Standard2.1"
6856
subnet_id = "${oci_core_subnet.t.id}"
57+
is_pv_encryption_in_transit_enabled = "true"
6958
metadata = {
7059
ssh_authorized_keys = "${var.ssh_public_key}"
7160
}
@@ -81,6 +70,7 @@ func (s *ResourceCoreVolumeAttachmentTestSuite) SetupTest() {
8170
image = "${var.InstanceImageOCID[var.region]}"
8271
shape = "VM.Standard2.1"
8372
subnet_id = "${oci_core_subnet.t.id}"
73+
is_pv_encryption_in_transit_enabled = "true"
8474
metadata = {
8575
ssh_authorized_keys = "${var.ssh_public_key}"
8676
}
@@ -94,7 +84,8 @@ func (s *ResourceCoreVolumeAttachmentTestSuite) SetupTest() {
9484
compartment_id = "${var.compartment_id}"
9585
display_name = "display_name"
9686
}
97-
`
87+
` + OciImageIdsVariable
88+
9889
s.ResourceName[0] = "oci_core_volume_attachment.t"
9990
s.ResourceName[1] = "oci_core_volume_attachment.t2"
10091
}

0 commit comments

Comments
 (0)