You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: research/testing/openshift-zuul-test-alternatives.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This research is about giving an answer to [this card](https://github.com/orgs/p
7
7
8
8
## Openshift tests using podman kube play
9
9
10
-
Following suggestions in [this research](https://packit.dev/research/testing/openshift-to-podman-kube-play) I have done a quick & dirty setup for running *packit-service openshift tests* using pods created with `podman kube play`.
10
+
Following suggestions in [this research](https://packit.dev/research/testing/openshift-to-podman-kube-play) I have done a quick & dirty setup for running _packit-service openshift tests_ using pods created with `podman kube play`.
11
11
12
12
### Quick and dirty steps for make them running
13
13
@@ -117,7 +117,7 @@ This is a **dirty** ansible playbook for doing it
117
117
file: "{{ path_to_secrets }}/extra-vars.yml"
118
118
name: vault
119
119
tags:
120
-
- always
120
+
- always
121
121
122
122
# to be able to read the github_app_id from the configuration file in tokman
123
123
- name: include packit-service configuration
@@ -257,7 +257,7 @@ index 0d555a13..2740aa4b 100644
257
257
- name: test-data-pv
258
258
mountPath: /tmp/test_data
259
259
- command: ["bash", "/src/files/run_tests.sh"]
260
-
- backoffLimit: 1
260
+
- backoffLimit: 1
261
261
+ #privileged: true
262
262
+ #securityContext:
263
263
+ # runAsUser: 1024
@@ -281,7 +281,7 @@ index 20ec681b..297064a5 100644
281
281
command: ["bash", "-c", "sleep 10000"]
282
282
```
283
283
284
-
Now you can run the packit-service openshift tests using podman kube instead of starting the *service* and the *worker*; remember of running a `podman kube play --down /tmp/xxx.yaml` for every line above where you have used `podman kube play /tmp/xxx.yaml`
284
+
Now you can run the packit-service openshift tests using podman kube instead of starting the _service_ and the _worker_; remember of running a `podman kube play --down /tmp/xxx.yaml` for every line above where you have used `podman kube play /tmp/xxx.yaml`
kwargs= {'active_context': None, 'config_persister': <bound method KubeConfigMerger.save_changes of <kubernetes.config.kube_config.KubeConfigMerger object at 0x7ff3a1ea7d30>>}
@@ -335,7 +335,7 @@ kcfg = <kubernetes.config.kube_config.KubeConfigMerger object at 0x7ff3a1ea7d30>
335
335
kcfg= KubeConfigMerger(filename)
336
336
if persist_config and'config_persister'notin kwargs:
337
337
kwargs['config_persister'] = kcfg.save_changes
338
-
338
+
339
339
if kcfg.config isNone:
340
340
>raise ConfigException(
341
341
'Invalid kube-config file. '
@@ -348,12 +348,13 @@ E kubernetes.config.config_exception.ConfigException: Invalid kube
348
348
## Summary
349
349
350
350
[`podman kube play`](https://docs.podman.io/en/v4.4/markdown/podman-kube-play.1.html) can not be used to test:
351
-
-*sandcastle*; we need a k8s cluster to be able to use the `kubernates` library. We could deploy pods in the cluster using [`podman kube apply`](https://docs.podman.io/en/v4.4/markdown/podman-kube-apply.1.html) but still we need an up and running cluster.
352
-
-*deployment*; the Openshift tests in the *deployment* repo are checking that pods are up and running on an Openshift dev instance; we can not check the same using `podman kube play`or`podman kube apply` (we would test different deployment settings...).
353
351
354
-
`podman kube play` can be used for openshift tests in*packit-service* project not related with*sandcastle* but `docker-compose` should be enough for these as well; so I don't really see advantages in using `podman kube play`.
352
+
- _sandcastle_; we need a k8s cluster to be able to use the `kubernates` library. We could deploy pods in the cluster using [`podman kube apply`](https://docs.podman.io/en/v4.4/markdown/podman-kube-apply.1.html) but still we need an up and running cluster.
353
+
- _deployment_; the Openshift tests in the _deployment_ repo are checking that pods are up and running on an Openshift dev instance; we can not check the same using `podman kube play`or`podman kube apply` (we would test different deployment settings...).
354
+
355
+
`podman kube play` can be used for openshift tests in _packit-service_ project not related with _sandcastle_ but `docker-compose` should be enough for these as well; so I don't really see advantages in using `podman kube play`.
355
356
356
-
For tests in*deployment*, *sandcastle*andin*packit-service* (which reference *sandcastle*) we still need a running k8s cluster.
357
+
For tests in_deployment_, _sandcastle_andin_packit-service_ (which reference _sandcastle_) we still need a running k8s cluster.
357
358
358
-
If I get it correctly, the **strimzi** project has tests running on Testing Farm using *minikube*: https://developers.redhat.com/articles/2023/08/17/how-testing-farm-makes-testing-your-upstream-project-easier#
359
-
For this reason I think we can probably make something similar using Openshift (maybe using Openshift Local - I think it makes sense to test everything against an Openshift instance).
359
+
If I get it correctly, the **strimzi** project has tests running on Testing Farm using _minikube_: https://developers.redhat.com/articles/2023/08/17/how-testing-farm-makes-testing-your-upstream-project-easier#
360
+
For this reason I think we can probably make something similar using Openshift (maybe using Openshift Local - I think it makes sense to test everything against an Openshift instance).
0 commit comments