Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PODMAN_USE_NAMESPACES to disable using namespaces on podman integration tests for podman v4.5 #6774

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/website/docs/overview/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,7 @@ Options here are mostly used for debugging and testing `odo` behavior.
| `TELEMETRY_CALLER` | Caller identifier passed to [telemetry](https://github.com/redhat-developer/odo/blob/main/USAGE_DATA.md). Case-insensitive. Acceptable values: `vscode`, `intellij`, `jboss`. | v3.1.0 | `intellij` |
| `ODO_TRACKING_CONSENT` | Useful for controlling [telemetry](https://github.com/redhat-developer/odo/blob/main/USAGE_DATA.md). Acceptable values: `yes` ([enables telemetry](https://github.com/redhat-developer/odo/blob/main/USAGE_DATA.md) and skips consent prompt), `no` (disables telemetry and consent prompt). Takes precedence over the [`ConsentTelemetry`](#preference-key-table) preference. | v3.2.0 | `yes` |
| `ODO_PUSH_IMAGES` | Whether to push the images once built; this is used only when applying Devfile image components as part of a Dev Session running on Podman; this is useful for integration tests running on Podman. `true` by default | v3.7.0 | `false` |
| `PODMAN_USE_NAMESPACES` | Whether to isolate pods on namespaces when running integration tests on Podman. `true` by default | v3.10.0 | `false` |


(1) Accepted boolean values are: `1`, `t`, `T`, `TRUE`, `true`, `True`, `0`, `f`, `F`, `FALSE`, `false`, `False`.
3 changes: 3 additions & 0 deletions tests/helper/helper_podman.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ import (
)

func GenerateAndSetContainersConf(dir string) {
if os.Getenv("PODMAN_USE_NAMESPACES") == "false" {
Copy link
Contributor

@valaparthvi valaparthvi Apr 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this can be a workaround for #6773 as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if os.Getenv("PODMAN_USE_NAMESPACES") == "false" {
useNamespace, _ := strconv.ParseBool(os.Getenv("PODMAN_USE_NAMESPACES"))
if !useNamespace {

return
}
ns := GetProjectName()
containersConfPath := filepath.Join(dir, "containers.conf")
err := CreateFileWithContent(containersConfPath, fmt.Sprintf(`
Expand Down