Skip to content

Commit 2f4dd58

Browse files
authored
Merge pull request #138 from tchughesiv/fixTest0.1.4
fix connection/instance tests
2 parents 62cb8a2 + 9e4b5af commit 2f4dd58

File tree

5 files changed

+28
-17
lines changed

5 files changed

+28
-17
lines changed

.github/workflows/dockerbuild.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Build Image
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
7+
- release-*
68
pull_request:
7-
branches: [main]
9+
branches:
10+
- main
11+
- release-*
812

913
jobs:
1014
build:

.github/workflows/gobuild.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Go
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
7+
- release-*
68
pull_request:
7-
branches: [main]
9+
branches:
10+
- main
11+
- release-*
812

913
jobs:
1014
test:

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
name: Golangci-lint and Gosec
2+
23
on:
34
push:
45
branches:
5-
- main
6+
- main
7+
- release-*
68
pull_request:
79
branches:
8-
- main
10+
- main
11+
- release-*
912

1013
jobs:
1114
golangci:

controllers/dbaasconnection_controller_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ var _ = Describe("DBaaSConnection controller - nominal", func() {
236236
}
237237

238238
Context("after creating DBaaSConnection", func() {
239-
connectionName := "test-connection"
239+
connectionName := "test-connection-1"
240240
instanceID := "test-instanceID"
241241
DBaaSConnectionSpec := &v1alpha1.DBaaSConnectionSpec{
242242
InventoryRef: v1alpha1.NamespacedName{
@@ -309,7 +309,7 @@ var _ = Describe("DBaaSConnection controller - valid dev namespaces", func() {
309309
Name: "other2",
310310
},
311311
}
312-
inventoryRefName := "test-inventory-ref"
312+
inventoryRefName := "test-inventory-ref-2"
313313
createdDBaaSInventory := &v1alpha1.DBaaSInventory{
314314
ObjectMeta: metav1.ObjectMeta{
315315
Name: inventoryRefName,
@@ -350,7 +350,7 @@ var _ = Describe("DBaaSConnection controller - valid dev namespaces", func() {
350350
}
351351

352352
Context("after creating DBaaSConnections in separate, valid dev namespaces", func() {
353-
connectionName := "test-connection"
353+
connectionName := "test-connection-2"
354354
instanceID := "test-instanceID"
355355
DBaaSConnectionSpec := &v1alpha1.DBaaSConnectionSpec{
356356
InventoryRef: v1alpha1.NamespacedName{
@@ -415,7 +415,7 @@ var _ = Describe("DBaaSConnection controller - valid dev namespaces", func() {
415415
Name: "other3",
416416
},
417417
}
418-
inventoryRefName := "test-inventory-ref"
418+
inventoryRefName := "test-inventory-ref-3"
419419
createdDBaaSInventory := &v1alpha1.DBaaSInventory{
420420
ObjectMeta: metav1.ObjectMeta{
421421
Name: inventoryRefName,
@@ -456,7 +456,7 @@ var _ = Describe("DBaaSConnection controller - valid dev namespaces", func() {
456456
}
457457

458458
Context("after creating DBaaSConnections in separate, valid dev namespaces", func() {
459-
connectionName := "test-connection"
459+
connectionName := "test-connection-3"
460460
instanceID := "test-instanceID"
461461
DBaaSConnectionSpec := &v1alpha1.DBaaSConnectionSpec{
462462
InventoryRef: v1alpha1.NamespacedName{

controllers/dbaasinstance_controller_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ var _ = Describe("DBaaSInstance controller with errors", func() {
124124
It("reconcile with error", assertDBaaSResourceStatusUpdated(createdDBaaSInstance, metav1.ConditionFalse, v1alpha1.DBaaSInventoryNotReady))
125125
})
126126
Context("after creating DBaaSInstance in an invalid namespace", func() {
127-
instanceName := "test-instance-not-ready"
128-
inventoryName := "test-instance-inventory-not-ready"
127+
instanceName := "test-instance-not-ready-2"
128+
inventoryName := "test-instance-inventory-diff-ns"
129129
DBaaSInventorySpec := &v1alpha1.DBaaSInventorySpec{
130130
CredentialsRef: &v1alpha1.NamespacedName{
131131
Name: testSecret.Name,
@@ -325,7 +325,7 @@ var _ = Describe("DBaaSInstance controller - valid dev namespaces", func() {
325325
Name: "other2",
326326
},
327327
}
328-
inventoryRefName := "test-inventory-ref"
328+
inventoryRefName := "test-inventory-ref-2"
329329
createdDBaaSInventory := &v1alpha1.DBaaSInventory{
330330
ObjectMeta: metav1.ObjectMeta{
331331
Name: inventoryRefName,
@@ -366,7 +366,7 @@ var _ = Describe("DBaaSInstance controller - valid dev namespaces", func() {
366366
}
367367

368368
Context("after creating DBaaSInstance in separate, valid dev namespace", func() {
369-
instanceName := "test-instance"
369+
instanceName := "test-instance-2"
370370
DBaaSInstanceSpec := &v1alpha1.DBaaSInstanceSpec{
371371
InventoryRef: v1alpha1.NamespacedName{
372372
Name: inventoryRefName,
@@ -438,7 +438,7 @@ var _ = Describe("DBaaSInstance controller - valid dev namespaces", func() {
438438
Name: "other3",
439439
},
440440
}
441-
inventoryRefName := "test-inventory-ref"
441+
inventoryRefName := "test-inventory-ref-3"
442442
createdDBaaSInventory := &v1alpha1.DBaaSInventory{
443443
ObjectMeta: metav1.ObjectMeta{
444444
Name: inventoryRefName,
@@ -479,7 +479,7 @@ var _ = Describe("DBaaSInstance controller - valid dev namespaces", func() {
479479
}
480480

481481
Context("after creating DBaaSInstance in separate, valid dev namespace", func() {
482-
instanceName := "test-instance"
482+
instanceName := "test-instance-3"
483483
DBaaSInstanceSpec := &v1alpha1.DBaaSInstanceSpec{
484484
InventoryRef: v1alpha1.NamespacedName{
485485
Name: inventoryRefName,

0 commit comments

Comments
 (0)