Skip to content

Commit 0e3542a

Browse files
author
ccushing
committed
Test concurrency changes
* Isolate compartment update tests from test that require a stable compartment configuration * Comment out a few assertions that require filters to run without complication * Fix makefile "zip" command
1 parent cdd6166 commit 0e3542a

File tree

4 files changed

+25
-22
lines changed

4 files changed

+25
-22
lines changed

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ else
1414
@echo Err! `make release` requires a version argument
1515
endif
1616

17-
zip: ;@cd bin
18-
zip -r windows.zip windows_386 windows_amd64
19-
tar -czvf darwin.tar.gz darwin_386 darwin_amd64
20-
tar -czvf freebsd.tar.gz freebsd_386 freebsd_amd64 freebsd_arm
21-
tar -czvf linux.tar.gz linux_386 linux_amd64 linux_arm
17+
zip:
18+
@cd bin; \
19+
zip -r windows.zip windows_386 windows_amd64; \
20+
tar -czvf darwin.tar.gz darwin_386 darwin_amd64; \
21+
tar -czvf freebsd.tar.gz freebsd_386 freebsd_amd64 freebsd_arm; \
22+
tar -czvf linux.tar.gz linux_386 linux_amd64 linux_arm; \
2223
tar -czvf openbsd.tar.gz openbsd_386 openbsd_amd64
2324

2425
### `make test run=TestResourceCore debug=1`

data_source_obmcs_loadbalancer_loadbalancers_test.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,12 @@ func TestAccDatasourceLoadBalancerLB_basic(t *testing.T) {
5858
Config: config,
5959
Check: resource.ComposeAggregateTestCheckFunc(
6060
resource.TestCheckResourceAttrSet(resourceName, "compartment_id"),
61-
resource.TestCheckResourceAttr(resourceName, "load_balancers.#", "1"),
62-
resource.TestCheckResourceAttr(resourceName, "load_balancers.0.shape", "100Mbps"),
63-
resource.TestCheckResourceAttr(resourceName, "load_balancers.0.display_name", "-tf-lb"),
64-
resource.TestCheckResourceAttr(resourceName, "load_balancers.0.is_private", "true"),
61+
resource.TestCheckResourceAttrSet(resourceName, "load_balancers.#"),
62+
// todo: these assertions wont be reliable until data sources support filters
63+
//resource.TestCheckResourceAttrSet(resourceName, "load_balancers.#"),
64+
//resource.TestCheckResourceAttr(resourceName, "load_balancers.0.shape", "100Mbps"),
65+
//resource.TestCheckResourceAttr(resourceName, "load_balancers.0.display_name", "-tf-lb"),
66+
//resource.TestCheckResourceAttr(resourceName, "load_balancers.0.is_private", "true"),
6567
),
6668
},
6769
},

data_source_obmcs_objectstorage_bucketsummary_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ func (s *DatasourceObjectstorageBucketSummaryTestSuite) TestAccDatasourceObjects
6060
resource.TestCheckResourceAttrSet(s.ResourceName, "compartment_id"),
6161
resource.TestCheckResourceAttrSet(s.ResourceName, "namespace"),
6262
resource.TestCheckResourceAttrSet(s.ResourceName, "bucket_summaries.#"),
63-
resource.TestCheckResourceAttr(s.ResourceName, "bucket_summaries.#", "1"),
64-
resource.TestCheckResourceAttr(s.ResourceName, "bucket_summaries.0.name", s.Token),
63+
// todo: these assertions wont be reliable until data sources support filters
64+
//resource.TestCheckResourceAttr(s.ResourceName, "bucket_summaries.#", "1"),
65+
//resource.TestCheckResourceAttr(s.ResourceName, "bucket_summaries.0.name", s.Token),
6566
),
6667
},
6768
},

resource_obmcs_identity_compartment_test.go

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ func (s *ResourceIdentityCompartmentTestSuite) SetupTest() {
2828
s.Provider = testAccProvider
2929
s.Providers = testAccProviders
3030
s.Config = testProviderConfig()
31-
3231
s.ResourceName = "oci_identity_compartment.t"
3332
}
3433

@@ -43,12 +42,12 @@ func (s *ResourceIdentityCompartmentTestSuite) TestAccResourceIdentityCompartmen
4342
ImportStateVerify: true,
4443
Config: s.Config + `
4544
resource "oci_identity_compartment" "t" {
46-
name = "-tf-compartment"
47-
description = "tf test compartment"
45+
name = "terraform-update-test-compartment"
46+
description = "for name and description update tests"
4847
}`,
4948
Check: resource.ComposeTestCheckFunc(
50-
resource.TestCheckResourceAttr(s.ResourceName, "name", "-tf-compartment"),
51-
resource.TestCheckResourceAttr(s.ResourceName, "description", "tf test compartment"),
49+
resource.TestCheckResourceAttr(s.ResourceName, "name", "terraform-update-test-compartment"),
50+
resource.TestCheckResourceAttr(s.ResourceName, "description", "for name and description update tests"),
5251
resource.TestCheckResourceAttr(s.ResourceName, "state", baremetal.ResourceActive),
5352
func(s *terraform.State) (err error) {
5453
resId, err = fromInstanceState(s, "oci_identity_compartment.t", "id")
@@ -60,12 +59,12 @@ func (s *ResourceIdentityCompartmentTestSuite) TestAccResourceIdentityCompartmen
6059
{
6160
Config: s.Config + `
6261
resource "oci_identity_compartment" "t" {
63-
name = "-tf-compartment2"
64-
description = "tf test compartment2"
62+
name = "terraform-update-test-compartment2"
63+
description = "for name and description update tests2"
6564
}`,
6665
Check: resource.ComposeTestCheckFunc(
67-
resource.TestCheckResourceAttr(s.ResourceName, "name", "-tf-compartment2"),
68-
resource.TestCheckResourceAttr(s.ResourceName, "description", "tf test compartment2"),
66+
resource.TestCheckResourceAttr(s.ResourceName, "name", "terraform-update-test-compartment2"),
67+
resource.TestCheckResourceAttr(s.ResourceName, "description", "for name and description update tests2"),
6968
func(s *terraform.State) (err error) {
7069
resId2, err = fromInstanceState(s, "oci_identity_compartment.t", "id")
7170
if resId != resId2 {
@@ -79,8 +78,8 @@ func (s *ResourceIdentityCompartmentTestSuite) TestAccResourceIdentityCompartmen
7978
{
8079
Config: s.Config + `
8180
resource "oci_identity_compartment" "t" {
82-
name = "-tf-compartment"
83-
description = "tf test compartment"
81+
name = "terraform-update-test-compartment"
82+
description = "for name and description update tests"
8483
}`,
8584
},
8685
},

0 commit comments

Comments
 (0)