Skip to content

Commit 76b9ed3

Browse files
authored
Merge pull request #211 from SAP/issue/167
feat: Add upgrade test batch 1 resources
2 parents b553141 + dd180fb commit 76b9ed3

5 files changed

Lines changed: 56 additions & 4 deletions

File tree

docs/upgrade-testing.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ Base tests use YAML manifests from `test/upgrade/testdata/baseCrs/`. Currently t
191191

192192
- **Organization** (import) - Uses `managementPolicies: [Observe]` to import existing org
193193
- **Space** - Lightweight resource for testing basic upgrade flow
194+
- **Domain**
195+
- **SpaceQuota**
196+
- **SpaceRole**
197+
198+
#### Test Base Resource Dependencies
199+
- **SpaceRole:** A space role can only be assigned to a user if the user is also a member of the space's organization.\
200+
🠊 Assign a user to the space's organization by either creating a SpaceMembers/SpaceRole resource or by using the BTP Cockpit
194201

195202
#### Adding New Base Test Resources
196203

@@ -311,11 +318,14 @@ test/
311318
│ ├── testdata/
312319
│ │ ├── baseCrs/ # Base upgrade test resources
313320
│ │ │ ├── import.yaml # Organization (observe)
314-
│ │ │ └── space.yaml # Space (create)
321+
│ │ │ ├── space.yaml # Space (create)
322+
| │ │ ├── domain.yaml
323+
| │ │ ├── space_quota.yaml
324+
| │ │ └── space_role.yaml
315325
│ │ └── customCRs/ # Custom upgrade test resources
316326
│ │ └── externalNames/ # External-name validation test
317-
│ │ ── space.yaml
318-
| | └── import.yaml
327+
│ │ ── space.yaml
328+
| | └── import.yaml
319329
│ ├── main_test.go # Test environment setup
320330
│ ├── upgrade_test.go # Base upgrade test logic
321331
│ ├── base_upgrade_test.go # Custom upgrade test framework
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: cloudfoundry.crossplane.io/v1alpha1
2+
kind: Domain
3+
metadata:
4+
name: upgrade-test-domain
5+
spec:
6+
forProvider:
7+
name: cfupgradetest.eu12.hana.ondemand.com
8+
orgRef:
9+
name: upgrade-test-org
10+
providerConfigRef:
11+
name: default

test/upgrade/testdata/baseCrs/import.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ spec:
88
forProvider:
99
# IMPORTANT: Change this to an org you have access to
1010
# Run `cf orgs` to see available organizations
11-
name: cf-ci-e2e # ← TODO: Change this to an existing org name
11+
name: cf-ci-e2e # ← TODO: Change this to an existing org name
12+
providerConfigRef:
13+
name: default
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: cloudfoundry.crossplane.io/v1alpha1
2+
kind: SpaceQuota
3+
metadata:
4+
name: upgrade-test-space-quota
5+
spec:
6+
forProvider:
7+
allowPaidServicePlans: false
8+
name: upgrade-test-space-quota
9+
orgRef:
10+
name: upgrade-test-org
11+
spacesRefs:
12+
- name: upgrade-test-space
13+
providerConfigRef:
14+
name: default
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: cloudfoundry.crossplane.io/v1alpha1
2+
kind: SpaceRole
3+
metadata:
4+
name: upgrade-test-space-role
5+
spec:
6+
forProvider:
7+
type: Developer
8+
9+
spaceRef:
10+
name: upgrade-test-space
11+
policy:
12+
resolution: Required
13+
resolve: Always
14+
providerConfigRef:
15+
name: default

0 commit comments

Comments
 (0)