Commit Graph

19 Commits

Author SHA1 Message Date
Armel Soro
e8ed1dfbae ci: Fix Podman job 2024-10-13 14:43:14 +02:00
Armel Soro
2508cf7362 Run only of asubset of the integration tests in OpenShift CI
Rationale: All of the integration tests are already covered in GitHb CI
(using Kubernetes), and they tend to be a bit flaky on OpenShift.
2024-05-18 09:15:33 +02:00
Parthvi Vala
a9e6cdc340 Refactor StartDevMode to return a single object instead of multiple args (#6886)
* Refactor StartDevMode to return an object instead of multiple variables

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix test

Signed-off-by: Parthvi Vala <pvala@redhat.com>

---------

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2023-06-16 10:01:27 -04:00
Armel Soro
b60fc5bc47 Fix flaky odo dev test on Podman by randomizing component names (#6833)
* Fix 'odo dev' tests by randomizing some missing component names

* Force setting a component name when copying example Devfiles

This way, we won't forget about this in the future.
2023-05-26 04:46:51 -04:00
Philippe Martin
26c90d7c4d Remove podman from experimental mode (#6628)
* Remove podman from experimental mode

* Remove env var for odo dev

* Cleanup tests and sources about experimental mode

* Hide "Experimental mode" doc page

* Cleanup latest commit

* doc odo dev --platform podman

* Doc other commands

* Apply suggestions from code review

Co-authored-by: Armel Soro <armel@rm3l.org>

* Remove more ODO_EXPERIMENTAL_MODE from latest commits on main

* Remove reference to Experimental mode from blog posts

---------

Co-authored-by: Armel Soro <armel@rm3l.org>
2023-03-06 14:17:39 +01:00
Armel Soro
51ebf26dcb Make sure to use random component names when copying sample Devfiles in integration tests (#6504)
* Make sure to use unique random component names in integration tests

This will help prevent conflicts when isolation is not possible (for example on Podman)

For consistency, next step would be not to use 'odo init --devfile-path', but instead rely on the updated helper.CopyExampleDevfile function everywhere.

* fixup! Make sure to use unique random component names in integration tests

* Eventually check server response in 'should expose all endpoints on localhost regardless of exposure' test
2023-01-18 12:39:47 -05:00
Philippe Martin
ce8fdc1d5b Rename generic run-on flag into platform (#6445)
* Rename pkg/odo/commonflags/run_on.go to pkg/odo/commonflags/platform.go and change runOn to platform

* Rename feature

* Rename into pkg/odo/commonflags/context/

* Update comments

* Update doc

* fix comment

* Update integration tests

* Duplicate runningOn field with platform + deprecated runningOn

* Mark RunningOn as Deprecated

* Do not modify blog post

* Fix typo

* Add exception for SA1019

* odo describe component

* Fix integration tests for odo describe component
2023-01-03 13:51:51 -05:00
Philippe Martin
83cdda6960 Test with OpenShift cluster non authenticated (#6395)
* Test with OpenShift cluster non authenticated

* Add analyze commands

* Add same tests as with NoCluster

* Do not try to cleanup namespaces

* Assert non authenticated

* Change Makefile target name
2022-12-09 06:41:38 -05:00
Philippe Martin
0c008c6be9 odo list component shows components running on podman (#6366)
* Enable run-on flag

* List all components

* Select specific platform with --run-on flag

* Make podmanClient nil if no podman client is accessible

* integration test

* Delay the display of warnings related to experimental features

* Add logs displaying podman commands executed

* Use None when Running On is empty

* odo list
2022-12-06 11:01:56 -05:00
Philippe Martin
120920f868 Integration tests for odo dev running on podman (#6332)
* Change signature of StartDevMode to use options structure

* Add tests for odo dev on podman

* Uncomment commented code

* Update Makefile

Co-authored-by: Armel Soro <armel@rm3l.org>

Co-authored-by: Armel Soro <armel@rm3l.org>
2022-11-24 08:24:00 -05:00
Philippe Martin
4c30c8ef0c More tests without cluster (#6303)
* Run build-images command without cluster

* Test odo remove binding without cluster

* Make odo describe component work without cluster

* Tests: configure cluster depending on nocluster label

* Make odo list component work when --namespace is not used

* Test odo list component before deployment without cluster

* Some Generic tests

* Unset KUBERNETES_SERVICE_HOST to disable in-cluster config

* Set KUBECONFIG to empty file for no-cluster tests

* Run no-cluster tests on Windows

* Fix ListIngresses related changes

* Add warning/error when no cluster connection is available
2022-11-21 11:06:04 -05:00
Philippe Martin
87fc43b58f Set empty component name in context if no devfile exists in the current directory (#6268)
* Set empty component name in context if no devfile exists in the current directory

* Add integration tests
2022-10-31 05:16:48 -04:00
Philippe Martin
9e39df37d3 Use map for runningIn instead of array in JSON output (#6094)
* Use map for runningIn instead of array

* Set false entries in runningIn map

* Rename RunningModeList to RunningModes + fix doc

* Fix integration test
2022-09-06 18:55:19 +02:00
Philippe Martin
64ee3db5b3 Implement "odo list" (#6043)
* Move "odo list" to "odo list component"

* Refactor odo list component

* Add --namespace flag to "odo list binding"

* odo list implementation

* Doc

* Apply suggestions from code review

Co-authored-by: Armel Soro <armel@rm3l.org>

Co-authored-by: Armel Soro <armel@rm3l.org>
2022-08-29 12:44:13 -04:00
Parthvi Vala
0e716239fb odo list: add odo version used to create a component to the output (#6028)
Signed-off-by: Parthvi Vala <pvala@redhat.com>

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-08-17 19:21:41 +00:00
Parthvi Vala
b4ee87281f Fix: Non odo components not reported (#6021)
* Fix: Non odo components not reported

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Add unit test

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Signed-off-by: Parthvi Vala <pvala@redhat.com>
2022-08-17 07:46:42 +00:00
Parthvi Vala
224069cd68 odo dev: Add support for non-exec commands part of a composite run or debug command (#5923)
* Initial commit

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Move ValidateResourceExist(s) from pkg/service to pkg/devfile/adapters/kubernetes/component

* Fix odo dev cleanup

* Fix multiple deployment issue

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* DRY the code

* Fix unit test failure

* Add integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* remove comment

* Add isPartOfComponent to GetLabels, and GetSelector

* Add unit tests for changes in ListResourcesToDeleteFromDevfile

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix unit test failures due to removal of component label

* Enhance integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Use a single devfile.yaml

* Fix test failures

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix rebase conflicts, add new tests for remote Dockerfile URI, and rm3l's review

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Co-authored-by: Parthvi Vala <pvala@redhat.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Attempt at fixing integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Mockgen

* Changes post rebase

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Attempt at fixing integration tests

Signed-off-by: Parthvi Vala <pvala@redhat.com>

* Fix rebase mishap

Signed-off-by: Parthvi Vala <pvala@redhat.com>

Co-authored-by: Armel Soro <armel@rm3l.org>
2022-08-10 10:41:43 +00:00
Anand Kumar Singh
0b6a166aa0 Cleanup test to skip setup cluster steps if needed (#5945)
* add global variables for setupcluster, add parameter in commonbeforeEach for skipping namespace creation

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* update commonbeforeeach in each tests to skip or execute project creation

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-07-15 16:28:56 +00:00
Anand Kumar Singh
c7f3f3b1d1 reduce test make targets, organize test file structure (#5931)
* reduce test make targets, organize test file structure

Signed-off-by: anandrkskd <anandrkskd@gmail.com>

* remove report collection

Signed-off-by: anandrkskd <anandrkskd@gmail.com>
2022-07-13 05:32:11 +00:00