Skip to content

Commit

Permalink
Revert "PODMAN_USE_NAMESPACES to disable using namespaces on podman i…
Browse files Browse the repository at this point in the history
…ntegration tests for podman v4.5 (redhat-developer#6774)"

We'll completely remove the usage of namespaces in the tests, as this
wad removed from Podman v4.5.0, because namespaces on Podman were
reportedly not really working [1].

This reverts commit ef9206a.

[1]
containers/podman@c4fe0af
  • Loading branch information
rm3l committed Apr 27, 2023
1 parent 00918c3 commit cc8e632
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions docs/website/docs/overview/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,5 @@ 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`.
14 changes: 0 additions & 14 deletions tests/helper/helper_podman.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,13 @@ import (
"os/exec"
"path/filepath"
"regexp"
"strconv"
"strings"

. "github.com/onsi/gomega"
"github.com/redhat-developer/odo/pkg/podman"
)

func getBooleanValueFromEnvVar(envvar string, defaultValue bool) bool {
strVal := os.Getenv("PODMAN_USE_NAMESPACES")
boolValue, err := strconv.ParseBool(strVal)
if err != nil {
return defaultValue
}
return boolValue
}

func GenerateAndSetContainersConf(dir string) {
useNamespaces := getBooleanValueFromEnvVar("PODMAN_USE_NAMESPACES", true)
if !useNamespaces {
return
}
ns := GetProjectName()
containersConfPath := filepath.Join(dir, "containers.conf")
err := CreateFileWithContent(containersConfPath, fmt.Sprintf(`
Expand Down

0 comments on commit cc8e632

Please sign in to comment.