Skip to content

Commit 32aa648

Browse files
committed
rework finicky chainsaw test
1 parent 614c54b commit 32aa648

File tree

7 files changed

+36
-85
lines changed

7 files changed

+36
-85
lines changed

e2e/linodeobjectstoragebucket-controller/force-delete-linodeobjectstoragebucket/assert-accessref.yaml

Lines changed: 0 additions & 11 deletions
This file was deleted.

e2e/linodeobjectstoragebucket-controller/force-delete-linodeobjectstoragebucket/assert-lobj.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

e2e/linodeobjectstoragebucket-controller/force-delete-linodeobjectstoragebucket/assert-lobjkey.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

e2e/linodeobjectstoragebucket-controller/force-delete-linodeobjectstoragebucket/chainsaw-test.yaml

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,30 @@ spec:
2525
try:
2626
- assert:
2727
file: assert-capi-resources.yaml
28-
- name: Create LinodeObjectStorageBucket
28+
- name: Create LinodeObjectStorageBucket and Key
2929
try:
3030
- apply:
31-
file: create-lobj.yaml
32-
- assert:
33-
file: assert-lobj.yaml
34-
catch:
35-
- describe:
31+
file: create-bucket-and-key.yaml
32+
- name: Wait for the bucket and key to be ready
33+
try:
34+
- wait:
3635
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
3736
kind: LinodeObjectStorageBucket
37+
name: ($bucket)
38+
timeout: 1m
39+
for:
40+
condition:
41+
name: Ready
42+
value: 'true'
43+
- wait:
44+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
45+
kind: LinodeObjectStorageKey
46+
name: ($access_secret)
47+
timeout: 1m
48+
for:
49+
condition:
50+
name: Ready
51+
value: 'true'
3852
- name: Check if the bucket was created
3953
try:
4054
- script:
@@ -51,16 +65,6 @@ spec:
5165
($error): ~
5266
(json_parse($stdout)):
5367
label: ($bucket)
54-
- name: Create LinodeObjectStorageKey
55-
try:
56-
- apply:
57-
file: create-lobjkey.yaml
58-
- assert:
59-
file: assert-lobjkey.yaml
60-
catch:
61-
- describe:
62-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
63-
kind: LinodeObjectStorageKey
6468
- name: Ensure the access key was created
6569
try:
6670
- script:
@@ -80,16 +84,6 @@ spec:
8084
"https://api.linode.com/v4/$URI/$KEY_ID"
8185
check:
8286
($error): ~
83-
- name: Set access key on LinodeObjectStorageBucket
84-
try:
85-
- apply:
86-
file: set-accessref.yaml
87-
- assert:
88-
file: assert-accessref.yaml
89-
catch:
90-
- describe:
91-
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
92-
kind: LinodeObjectStorageBucket
9387
- name: Delete LinodeObjectStorageBucket
9488
try:
9589
- delete:
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1+
---
2+
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
3+
kind: LinodeObjectStorageBucket
4+
metadata:
5+
name: ($bucket)
6+
spec:
7+
accessKeyRef:
8+
name: ($bucket)
9+
forceDeleteBucket: true
10+
region: us-sea
11+
---
112
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
213
kind: LinodeObjectStorageKey
314
metadata:
415
name: ($bucket)
516
spec:
617
bucketAccess:
7-
- bucketName: ($bucket)
8-
permissions: read_write
9-
region: us-sea
18+
- bucketName: ($bucket)
19+
permissions: read_write
20+
region: us-sea
1021
generatedSecret:
11-
name: ($access_secret)
1222
format:
23+
access: '{{ .AccessKey }}'
1324
bucket: '{{ .BucketName }}'
1425
endpoint: '{{ .S3Endpoint }}'
15-
access: '{{ .AccessKey }}'
1626
secret: '{{ .SecretKey }}'
27+
type: Opaque

e2e/linodeobjectstoragebucket-controller/force-delete-linodeobjectstoragebucket/create-lobj.yaml

Lines changed: 0 additions & 6 deletions
This file was deleted.

e2e/linodeobjectstoragebucket-controller/force-delete-linodeobjectstoragebucket/set-accessref.yaml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)