Skip to content

Commit 4147d09

Browse files
committedApr 11, 2023
readme fixes and adding bundle test.
1 parent f59b94f commit 4147d09

File tree

5 files changed

+107
-0
lines changed

5 files changed

+107
-0
lines changed
 

‎README.md

+8
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,11 @@ $ make kuttl
9797
```
9898
Friendly reminder: make sure you have the frontend operator runnning (`make run-local`) before you run the tests or they will never work and you'll go nuts trying to figure out why.
9999

100+
If you want to run a single test you can do this:
101+
```bash
102+
$ kubectl kuttl test --config kuttl-config.yml ./tests/e2e --test bundles
103+
```
104+
where `bundles` is the name of the directory that contains the test you want to run.
105+
106+
107+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
apiVersion: v1
3+
kind: Namespace
4+
metadata:
5+
name: test-bundles
6+
spec:
7+
finalizers:
8+
- kubernetes
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
apiVersion: cloud.redhat.com/v1alpha1
3+
kind: FrontendEnvironment
4+
metadata:
5+
name: test-bundles-environment
6+
spec:
7+
generateNavJSON: false
8+
ssl: false
9+
hostname: foo.redhat.com
10+
sso: https://sso.foo.redhat.com
11+
---
12+
apiVersion: cloud.redhat.com/v1alpha1
13+
kind: Frontend
14+
metadata:
15+
name: chrome
16+
namespace: test-bundles
17+
spec:
18+
API:
19+
versions:
20+
- v1
21+
frontend:
22+
paths:
23+
- /
24+
deploymentRepo: https://github.com/RedHatInsights/insights-chrome
25+
envName: test-bundles-environment
26+
image: quay.io/cloudservices/insights-chrome-frontend:720317c
27+
module:
28+
config:
29+
ssoUrl: 'https://'
30+
manifestLocation: /apps/chrome/js/fed-mods.json
31+
title: Chrome
32+
---
33+
apiVersion: cloud.redhat.com/v1alpha1
34+
kind: Bundle
35+
metadata:
36+
name: test-bundles-navigation
37+
spec:
38+
id: test
39+
title: FEO Test Bundle
40+
appList:
41+
- chrome
42+
envName: test-bundles-environment

‎tests/e2e/bundles/02-assert.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
kind: Deployment
3+
apiVersion: apps/v1
4+
metadata:
5+
name: chrome-frontend
6+
namespace: test-bundles
7+
labels:
8+
frontend: chrome
9+
ownerReferences:
10+
- apiVersion: cloud.redhat.com/v1alpha1
11+
kind: Frontend
12+
name: chrome
13+
spec:
14+
selector:
15+
matchLabels:
16+
frontend: chrome
17+
template:
18+
spec:
19+
volumes:
20+
- name: config
21+
configMap:
22+
name: test-bundles-environment
23+
defaultMode: 420
24+
containers:
25+
- name: fe-image
26+
image: 'quay.io/cloudservices/insights-chrome-frontend:720317c'
27+
ports:
28+
- name: web
29+
containerPort: 80
30+
protocol: TCP
31+
- name: metrics
32+
containerPort: 9000
33+
protocol: TCP
34+
volumeMounts:
35+
- name: config
36+
mountPath: /opt/app-root/src/build/operator-generated

‎tests/e2e/bundles/03-delete.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
apiVersion: kuttl.dev/v1beta1
3+
kind: TestStep
4+
delete:
5+
- apiVersion: cloud.redhat.com/v1alpha1
6+
kind: Frontend
7+
name: chrome
8+
- apiVersion: cloud.redhat.com/v1alpha1
9+
kind: FrontendEnvironment
10+
name: test-bundles-environment
11+
- apiVersion: v1
12+
kind: Namespace
13+
name: test-bundles

0 commit comments

Comments
 (0)
Please sign in to comment.