Skip to content

Commit 9c311db

Browse files
authored
Merge pull request #280 from weizhouapache/e2e-update-readme
e2e: Add run-e2e command to test/e2e/README.md
2 parents 19d0d41 + 9fc0d8d commit 9c311db

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed

test/e2e/README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,3 +83,90 @@ When this environment variable is set to *true* a 15s pause is inserted at the b
8383
- Launch the e2e test: *PAUSE_FOR_DEBUGGER_ATTACH=true JOB=MyTest make run-e2e*
8484
- Wait for console message: *Pausing 15s so you have a chance to attach a debugger to this process...*
8585
- Quickly attach your debugger to the e2e process (i.e., e2e.test)
86+
87+
## CI/CD for e2e testing
88+
89+
The community has set up a CI/CD pipeline using Jenkins for e2e testing.
90+
91+
### How it works
92+
93+
The CI/CD pipeline works as below
94+
95+
- User triggers e2e testing by a Github PR comment, only repository OWNERS and a list of engineers are allowed;
96+
- A program monitors the PR comments of the Github repository, parses the comments and kick Jenkins jobs;
97+
- Jenkins creates a Apache CloudStack with specific version and hypervisor type, if needed;
98+
- Jenkins runs CAPC e2e testing with specific Kubernetes versions and images;
99+
- Jenkins posts the results of e2e testing as a Github PR comment, with the link of test logs.
100+
101+
### How to use it
102+
103+
Similar as other prow commands(see [here](https://prow.k8s.io/command-help?repo=kubernetes-sigs%2Fcluster-api-provider-cloudstack)), the e2e testing can be triggered by PR comment `/run-e2e`:
104+
105+
```
106+
Usage: /run-e2e [-k Kubernetes_Version] [-c CloudStack_Version] [-h Hypervisor] [-i Template/Image]
107+
[-f Kubernetes_Version_Upgrade_From] [-t Kubernetes_Version_Upgrade_To]
108+
```
109+
110+
- Supported Kubernetes versions are: ['1.27.2', '1.26.5', '1.25.10', '1.24.14', '1.23.3', '1.22.6']. The default value is '1.27.2'.
111+
- Supported CloudStack versions are: ['4.18', '4.17', '4.16']. If it is not set, an existing environment will be used.
112+
- Supported hypervisors are: ['kvm', 'vmware', 'xen']. The default value is 'kvm'.
113+
- Supported templates are: ['ubuntu-2004-kube', 'rockylinux-8-kube']. The default value is 'ubuntu-2004-kube'.
114+
- By default it tests Kubernetes upgrade from version '1.26.5' to '1.27.2'.
115+
116+
### Examples
117+
118+
1. Examples of `/run-e2e` commands
119+
120+
```
121+
/run-e2e
122+
/run-e2e -k 1.27.2 -h kvm -i ubuntu-2004-kube
123+
/run-e2e -k 1.27.2 -c 4.18 -h kvm -i ubuntu-2004-kube -f 1.26.5 -t 1.27.2
124+
```
125+
126+
2. Example of test results
127+
```
128+
Test Results : (tid-126)
129+
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
130+
Kubernetes Version: v1.27.2
131+
Kubernetes Version upgrade from: v1.26.5
132+
Kubernetes Version upgrade to: v1.27.2
133+
CloudStack Version: 4.18
134+
Template: ubuntu-2004-kube
135+
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr277-sl-126.zip
136+
137+
[PASS] When testing Kubernetes version upgrades Should successfully upgrade kubernetes versions when there is a change in relevant fields
138+
[PASS] When testing subdomain Should create a cluster in a subdomain
139+
[PASS] When testing K8S conformance [Conformance] Should create a workload cluster and run kubetest
140+
[PASS] When testing app deployment to the workload cluster with slow network [ToxiProxy] Should be able to download an HTML from the app deployed to the workload cluster
141+
[PASS] When testing multiple CPs in a shared network with kubevip Should successfully create a cluster with multiple CPs in a shared network
142+
[PASS] When testing resource cleanup Should create a new network when the specified network does not exist
143+
[PASS] When testing app deployment to the workload cluster with network interruption [ToxiProxy] Should be able to create a cluster despite a network interruption during that process
144+
[PASS] When testing node drain timeout A node should be forcefully removed if it cannot be drained in time
145+
[PASS] When testing machine remediation Should replace a machine when it is destroyed
146+
[PASS] When testing with custom disk offering Should successfully create a cluster with a custom disk offering
147+
[PASS] When testing horizontal scale out/in [TC17][TC18][TC20][TC21] Should successfully scale machine replicas up and down horizontally
148+
[PASS] When testing MachineDeployment rolling upgrades Should successfully upgrade Machines upon changes in relevant MachineDeployment fields
149+
[PASS] with two clusters should successfully add and remove a second cluster without breaking the first cluster
150+
[PASS] When testing with disk offering Should successfully create a cluster with disk offering
151+
[PASS] When testing affinity group Should have host affinity group when affinity is pro
152+
[PASS] When testing affinity group Should have host affinity group when affinity is anti
153+
[PASS] When the specified resource does not exist Should fail due to the specified account is not found [TC4a]
154+
[PASS] When the specified resource does not exist Should fail due to the specified domain is not found [TC4b]
155+
[PASS] When the specified resource does not exist Should fail due to the specified control plane offering is not found [TC7]
156+
[PASS] When the specified resource does not exist Should fail due to the specified template is not found [TC6]
157+
[PASS] When the specified resource does not exist Should fail due to the specified zone is not found [TC3]
158+
[PASS] When the specified resource does not exist Should fail due to the specified disk offering is not found
159+
[PASS] When the specified resource does not exist Should fail due to the compute resources are not sufficient for the specified offering [TC8]
160+
[PASS] When the specified resource does not exist Should fail due to the specified disk offer is not customized but the disk size is specified
161+
[PASS] When the specified resource does not exist Should fail due to the specified disk offer is customized but the disk size is not specified
162+
[PASS] When the specified resource does not exist Should fail due to the public IP can not be found
163+
[PASS] When the specified resource does not exist When starting with a healthy cluster Should fail to upgrade worker machine due to insufficient compute resources
164+
[PASS] When the specified resource does not exist When starting with a healthy cluster Should fail to upgrade control plane machine due to insufficient compute resources
165+
[PASS] When testing app deployment to the workload cluster [TC1][PR-Blocking] Should be able to download an HTML from the app deployed to the workload cluster
166+
167+
168+
Ran 28 of 29 Specs in 10458.173 seconds
169+
SUCCESS! -- 28 Passed | 0 Failed | 0 Pending | 1 Skipped
170+
PASS
171+
172+
```

0 commit comments

Comments
 (0)