Skip to content

Commit f259912

Browse files
committed
Upgrade to support Go 1.11
1 parent b940e72 commit f259912

9 files changed

+36
-51
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
- docker
55
language: go
66
go:
7-
- "1.10.x"
7+
- "1.11.x"
88

99
install:
1010
# This script is used by the Travis build to install a cookie for
@@ -26,4 +26,4 @@ branches:
2626
matrix:
2727
fast_finish: true
2828
allow_failures:
29-
- go: tip
29+
- go: tip

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/hashicorp/terraform/plugin"
77
"github.com/hashicorp/terraform/terraform"
88

9-
"github.com/terraform-providers/terraform-provider-oci/oci"
9+
provider "github.com/terraform-providers/terraform-provider-oci/oci"
1010
)
1111

1212
func main() {

oci/core_instance_pool_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ var (
4040
"compartment_id": Representation{repType: Required, create: `${var.compartment_id}`},
4141
"instance_configuration_id": Representation{repType: Required, create: `${oci_core_instance_configuration.test_instance_configuration.id}`},
4242
"placement_configurations": RepresentationGroup{Required, instancePoolPlacementConfigurationsRepresentation},
43-
"size": Representation{repType: Required, create: `2`, update: `3`},
44-
"state": Representation{repType: Optional, create: `Running`},
45-
"defined_tags": Representation{repType: Optional, create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
46-
"display_name": Representation{repType: Optional, create: `backend-servers-pool`, update: `displayName2`},
47-
"freeform_tags": Representation{repType: Optional, create: map[string]string{"Department": "Finance"}, update: map[string]string{"Department": "Accounting"}},
43+
"size": Representation{repType: Required, create: `2`, update: `3`},
44+
"state": Representation{repType: Optional, create: `Running`},
45+
"defined_tags": Representation{repType: Optional, create: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}`, update: `${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "updatedValue")}`},
46+
"display_name": Representation{repType: Optional, create: `backend-servers-pool`, update: `displayName2`},
47+
"freeform_tags": Representation{repType: Optional, create: map[string]string{"Department": "Finance"}, update: map[string]string{"Department": "Accounting"}},
4848
}
4949
instancePoolPlacementConfigurationsRepresentation = map[string]interface{}{
5050
"availability_domain": Representation{repType: Required, create: `${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}`},

oci/core_route_table_attachment_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ func TestCoreRouteTableAttachmentResource_basic(t *testing.T) {
2828

2929
resourceName := "oci_core_route_table_attachment.test_route_table_attachment"
3030

31-
var resId string
3231
var routeTableIdFromRT string
3332

3433
resource.Test(t, resource.TestCase{
@@ -43,11 +42,6 @@ func TestCoreRouteTableAttachmentResource_basic(t *testing.T) {
4342
generateResourceFromRepresentationMap("oci_core_route_table_attachment", "test_route_table_attachment", Required, Create, routeTableAttachmentRepresentation),
4443
Check: resource.ComposeAggregateTestCheckFunc(
4544
func(s *terraform.State) (err error) {
46-
resId, err = fromInstanceState(s, resourceName, "id")
47-
if err != nil {
48-
return err
49-
}
50-
5145
routeTableIdFromRT, err := fromInstanceState(s, "oci_core_route_table.test_route_table", "id")
5246
if err != nil {
5347
return err

oci/core_virtual_circuit_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ var (
4040
}
4141

4242
virtualCircuitPublicRequiredOnlyRepresentation = map[string]interface{}{
43-
"compartment_id": Representation{repType: Required, create: `${var.compartment_id}`},
44-
"type": Representation{repType: Required, create: `${var.virtual_circuit_type}`},
43+
"compartment_id": Representation{repType: Required, create: `${var.compartment_id}`},
44+
"type": Representation{repType: Required, create: `${var.virtual_circuit_type}`},
4545
"cross_connect_mappings": RepresentationGroup{Required, crossConnectMappingsPublicRequiredOnlyRepresentation},
4646
"customer_bgp_asn": Representation{repType: Required, create: `10`, update: `11`},
4747
"public_prefixes": RepresentationGroup{Required, virtualCircuitPublicPrefixesRepresentation},
4848
}
4949
virtualCircuitRequiredOnlyRepresentation = map[string]interface{}{
50-
"compartment_id": Representation{repType: Required, create: `${var.compartment_id}`},
51-
"type": Representation{repType: Required, create: `${var.virtual_circuit_type}`},
50+
"compartment_id": Representation{repType: Required, create: `${var.compartment_id}`},
51+
"type": Representation{repType: Required, create: `${var.virtual_circuit_type}`},
5252
"cross_connect_mappings": RepresentationGroup{Required, crossConnectMappingsRequiredOnlyRepresentation},
5353
"customer_bgp_asn": Representation{repType: Required, create: `10`, update: `11`},
5454
"gateway_id": Representation{repType: Required, create: `${oci_core_drg.test_drg.id}`},

oci/helpers_objectstorage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ func multiPartUploadImpl(multipartUploadData MultipartUploadData) (string, error
222222

223223
for i := 0; i < workerCount; i++ {
224224
go uploadPartsWorker(objectStorageMultiPartUploadContext{
225-
client: *client,
226-
wg: wg,
225+
client: *client,
226+
wg: wg,
227227
multipartUploadResponse: multipartUploadResponse,
228228
multipartUploadRequest: *multipartUploadRequest,
229229
sourceBlocks: sourceBlocksChan,

oci/identity_user_capabilities_management_resource_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ func (s *ResourceIdentityUserCapabilitiesManagementTestSuite) SetupTest() {
2727
}
2828

2929
func (s *ResourceIdentityUserCapabilitiesManagementTestSuite) TestAccResourceIdentityUserCapabilitiesManagement_basic() {
30-
var resId string
3130
_, tokenFn := tokenize()
3231
resource.Test(s.T(), resource.TestCase{
3332
Providers: s.Providers,
@@ -57,10 +56,6 @@ func (s *ResourceIdentityUserCapabilitiesManagementTestSuite) TestAccResourceIde
5756
resource.TestCheckResourceAttr(s.ResourceName, "can_use_console_password", "false"),
5857
resource.TestCheckResourceAttr(s.ResourceName, "can_use_customer_secret_keys", "false"),
5958
resource.TestCheckResourceAttr(s.ResourceName, "can_use_smtp_credentials", "false"),
60-
func(s *terraform.State) (err error) {
61-
resId, err = fromInstanceState(s, "oci_identity_user_capabilities_management.t", "id")
62-
return err
63-
},
6459
),
6560
},
6661
// verify update with capabilities all as true
@@ -88,10 +83,6 @@ func (s *ResourceIdentityUserCapabilitiesManagementTestSuite) TestAccResourceIde
8883
resource.TestCheckResourceAttr(s.ResourceName, "can_use_console_password", "true"),
8984
resource.TestCheckResourceAttr(s.ResourceName, "can_use_customer_secret_keys", "true"),
9085
resource.TestCheckResourceAttr(s.ResourceName, "can_use_smtp_credentials", "true"),
91-
func(s *terraform.State) (err error) {
92-
resId, err = fromInstanceState(s, "oci_identity_user_capabilities_management.t", "id")
93-
return err
94-
},
9586
),
9687
},
9788
},

oci/load_balancer_backend_set_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ var (
2626
}
2727

2828
backendSetRepresentation = map[string]interface{}{
29-
"health_checker": RepresentationGroup{Required, backendSetHealthCheckerRepresentation},
30-
"load_balancer_id": Representation{repType: Required, create: `${oci_load_balancer_load_balancer.test_load_balancer.id}`},
31-
"name": Representation{repType: Required, create: `backendSet1`},
32-
"policy": Representation{repType: Required, create: `LEAST_CONNECTIONS`},
29+
"health_checker": RepresentationGroup{Required, backendSetHealthCheckerRepresentation},
30+
"load_balancer_id": Representation{repType: Required, create: `${oci_load_balancer_load_balancer.test_load_balancer.id}`},
31+
"name": Representation{repType: Required, create: `backendSet1`},
32+
"policy": Representation{repType: Required, create: `LEAST_CONNECTIONS`},
3333
"session_persistence_configuration": RepresentationGroup{Optional, backendSetSessionPersistenceConfigurationRepresentation},
3434
"ssl_configuration": RepresentationGroup{Optional, backendSetSslConfigurationRepresentation},
3535
}

oci/object_storage_object_lifecycle_policy_test.go

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ func TestObjectStorageObjectLifecyclePolicyResource_basic(t *testing.T) {
9696
resource.TestCheckResourceAttrSet(resourceName, "namespace"),
9797
resource.TestCheckResourceAttr(resourceName, "rules.#", "1"),
9898
CheckResourceSetContainsElementWithProperties(resourceName, "rules", map[string]string{
99-
"action": "ARCHIVE",
100-
"is_enabled": "false",
101-
"name": "sampleRule",
102-
"object_name_filter.#": "1",
99+
"action": "ARCHIVE",
100+
"is_enabled": "false",
101+
"name": "sampleRule",
102+
"object_name_filter.#": "1",
103103
"object_name_filter.0.inclusion_prefixes.#": "2",
104-
"time_amount": "10",
105-
"time_unit": "DAYS",
104+
"time_amount": "10",
105+
"time_unit": "DAYS",
106106
},
107107
[]string{}),
108108

@@ -122,13 +122,13 @@ func TestObjectStorageObjectLifecyclePolicyResource_basic(t *testing.T) {
122122
resource.TestCheckResourceAttrSet(resourceName, "namespace"),
123123
resource.TestCheckResourceAttr(resourceName, "rules.#", "1"),
124124
CheckResourceSetContainsElementWithProperties(resourceName, "rules", map[string]string{
125-
"action": "DELETE",
126-
"is_enabled": "true",
127-
"name": "name2",
128-
"object_name_filter.#": "1",
125+
"action": "DELETE",
126+
"is_enabled": "true",
127+
"name": "name2",
128+
"object_name_filter.#": "1",
129129
"object_name_filter.0.inclusion_prefixes.#": "3",
130-
"time_amount": "11",
131-
"time_unit": "YEARS",
130+
"time_amount": "11",
131+
"time_unit": "YEARS",
132132
},
133133
[]string{}),
134134

@@ -155,13 +155,13 @@ func TestObjectStorageObjectLifecyclePolicyResource_basic(t *testing.T) {
155155

156156
resource.TestCheckResourceAttr(singularDatasourceName, "rules.#", "1"),
157157
CheckResourceSetContainsElementWithProperties(singularDatasourceName, "rules", map[string]string{
158-
"action": "DELETE",
159-
"is_enabled": "true",
160-
"name": "name2",
161-
"object_name_filter.#": "1",
158+
"action": "DELETE",
159+
"is_enabled": "true",
160+
"name": "name2",
161+
"object_name_filter.#": "1",
162162
"object_name_filter.0.inclusion_prefixes.#": "3",
163-
"time_amount": "11",
164-
"time_unit": "YEARS",
163+
"time_amount": "11",
164+
"time_unit": "YEARS",
165165
},
166166
[]string{}),
167167
resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"),

0 commit comments

Comments
 (0)