Skip to content

Commit aa217e2

Browse files
committed
docs(devel/ote): added devel docs for OTE CCM-AWS
Creating development document to build and use the OTE binary for CCM-AWS project.
1 parent 0d6d1e1 commit aa217e2

1 file changed

Lines changed: 92 additions & 0 deletions

File tree

docs/dev/ote-ccm-aws.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# OpenShift Tests Extension (OTE) for AWS Cloud Controller Manager
2+
3+
The OpenShift Tests Extension (OTE) binary `aws-cloud-controller-manager-tests-ext`
4+
exposes the upstream e2e tests from `cloud-provider-aws` (implemented under `tests/e2e`)
5+
to the OpenShift test framework. Tests are selected/curated by the filters defined in
6+
`main.go`, so that only the intended subset is available in the OpenShift test pipeline.
7+
8+
OpenShift-specific (downstream) tests live under `cmd/cloud-controller-manager-aws-tests-ext/e2e`
9+
and are added to the list of tests executed by `openshift-tests`.
10+
11+
The OTE library uses dot imports to register both upstream and downstream Ginkgo specs into the suite.
12+
13+
```mermaid
14+
flowchart LR
15+
A["Upstream Tests<br/>kubernetes/cloud-provider-aws<br/>tests/e2e"] --> C["OTE Binary<br/>aws-cloud-controller-manager-tests-ext"]
16+
B["Downstream Tests<br/>openshift/cluster-cloud-controller-manager-operator<br/>cmd/cloud-controller-manager-aws-tests-ext/e2e"] --> C
17+
C --> D["openshift-tests<br/>execution framework"]
18+
19+
style A fill:#e1f5ff
20+
style B fill:#fff4e1
21+
style C fill:#e8f5e9
22+
style D fill:#f3e5f5
23+
```
24+
25+
## Directory Structure
26+
27+
```
28+
cmd/cloud-controller-manager-aws-tests-ext/
29+
├── e2e/
30+
│ ├── loadbalancer.go # OpenShift-specific load balancer tests
31+
│ └── helper.go # Helper functions (AWS clients, feature gate checks, etc.)
32+
├── main.go # Test binary entrypoint
33+
└── README.md
34+
```
35+
36+
## Prerequisites
37+
38+
- Go 1.24+
39+
- Access to an OpenShift cluster on AWS
40+
- Valid `KUBECONFIG` pointing to the cluster
41+
- AWS credentials configured (for tests that query AWS APIs)
42+
43+
## Building
44+
45+
### Building the test binary
46+
47+
To build the OTE binary from the root of the project:
48+
49+
```sh
50+
make cloud-controller-manager-aws-tests-ext
51+
```
52+
53+
The binary will be created at the `bin/` directory: `./bin/cloud-controller-manager-aws-tests-ext`.
54+
55+
### Building the container image
56+
57+
To build the container image (regular CCCMO build):
58+
59+
```sh
60+
make image
61+
```
62+
63+
The binary will be created in the container image path `/usr/bin/cloud-controller-manager-aws-tests-ext.gz`.
64+
65+
## Using the test binary
66+
67+
### List available tests
68+
69+
```sh
70+
./aws-cloud-controller-manager-tests-ext list --topology=HighAvailability --platform=aws | jq .[].name
71+
```
72+
73+
Example output:
74+
```
75+
"[cloud-provider-aws-e2e-openshift] loadbalancer NLB feature AWSServiceLBNetworkSecurityGroup should have NLBSecurityGroupMode = Managed in cloud-config [Suite:openshift/conformance/parallel]"
76+
...
77+
"[cloud-provider-aws-e2e] nodes should set zone-id topology label [Suite:openshift/conformance/parallel]"
78+
"[cloud-provider-aws-e2e] nodes should label nodes with topology network info if instance is supported [Suite:openshift/conformance/parallel]"
79+
```
80+
81+
### List test suites
82+
83+
```sh
84+
./bin/cloud-controller-manager-aws-tests-ext list suites | jq .[].name
85+
```
86+
87+
### Run a specific test
88+
89+
```sh
90+
export KUBECONFIG=/path/to/kubeconfig
91+
./bin/cloud-controller-manager-aws-tests-ext run-test "[cloud-provider-aws-e2e-openshift] loadbalancer NLB [OCPFeatureGate:AWSServiceLBNetworkSecurityGroup] should have security groups attached to default ingress controller NLB [Suite:openshift/conformance/parallel]"
92+
```

0 commit comments

Comments
 (0)