diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-08 16:04:20 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-03-10 06:34:47 -0500 |
commit | c9ef2607104a0b17e5146b3ee01852edb7d3d688 (patch) | |
tree | 242c642f1495c16038bf4145d583fa67f0e27d0e /test | |
parent | 5331096b3882cd5c8e587200560e44ef1eb990a3 (diff) | |
download | podman-c9ef2607104a0b17e5146b3ee01852edb7d3d688.tar.gz podman-c9ef2607104a0b17e5146b3ee01852edb7d3d688.tar.bz2 podman-c9ef2607104a0b17e5146b3ee01852edb7d3d688.zip |
Document CONTAINERS_CONF/CONTAINERS_STORAGE_CONF Env variables
Also Switch to using CONTAINERS_REGISTRIES_CONF for registries.conf
overrides.
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/apiv2/rest_api/__init__.py | 4 | ||||
-rw-r--r-- | test/e2e/libpod_suite_remote_test.go | 6 | ||||
-rw-r--r-- | test/e2e/libpod_suite_test.go | 6 | ||||
-rw-r--r-- | test/e2e/login_logout_test.go | 8 | ||||
-rw-r--r-- | test/python/docker/__init__.py | 4 |
5 files changed, 14 insertions, 14 deletions
diff --git a/test/apiv2/rest_api/__init__.py b/test/apiv2/rest_api/__init__.py index db0257f03..b7b8a7649 100644 --- a/test/apiv2/rest_api/__init__.py +++ b/test/apiv2/rest_api/__init__.py @@ -27,7 +27,7 @@ class Podman(object): self.cmd.append("--root=" + os.path.join(self.anchor_directory, "crio")) self.cmd.append("--runroot=" + os.path.join(self.anchor_directory, "crio-run")) - os.environ["REGISTRIES_CONFIG_PATH"] = os.path.join(self.anchor_directory, "registry.conf") + os.environ["CONTAINERS_REGISTRIES_CONF"] = os.path.join(self.anchor_directory, "registry.conf") p = configparser.ConfigParser() p.read_dict( { @@ -36,7 +36,7 @@ class Podman(object): "registries.block": {"registries": "[]"}, } ) - with open(os.environ["REGISTRIES_CONFIG_PATH"], "w") as w: + with open(os.environ["CONTAINERS_REGISTRIES_CONF"], "w") as w: p.write(w) os.environ["CNI_CONFIG_PATH"] = os.path.join(self.anchor_directory, "cni", "net.d") diff --git a/test/e2e/libpod_suite_remote_test.go b/test/e2e/libpod_suite_remote_test.go index a26765ee9..3115c246f 100644 --- a/test/e2e/libpod_suite_remote_test.go +++ b/test/e2e/libpod_suite_remote_test.go @@ -48,17 +48,17 @@ func (p *PodmanTestIntegration) PodmanExtraFiles(args []string, extraFiles []*os func (p *PodmanTestIntegration) setDefaultRegistriesConfigEnv() { defaultFile := filepath.Join(INTEGRATION_ROOT, "test/registries.conf") - os.Setenv("REGISTRIES_CONFIG_PATH", defaultFile) + os.Setenv("CONTAINERS_REGISTRIES_CONF", defaultFile) } func (p *PodmanTestIntegration) setRegistriesConfigEnv(b []byte) { outfile := filepath.Join(p.TempDir, "registries.conf") - os.Setenv("REGISTRIES_CONFIG_PATH", outfile) + os.Setenv("CONTAINERS_REGISTRIES_CONF", outfile) ioutil.WriteFile(outfile, b, 0644) } func resetRegistriesConfigEnv() { - os.Setenv("REGISTRIES_CONFIG_PATH", "") + os.Setenv("CONTAINERS_REGISTRIES_CONF", "") } func PodmanTestCreate(tempDir string) *PodmanTestIntegration { pti := PodmanTestCreateUtil(tempDir, true) diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go index 0ae30ca10..cc03ccc96 100644 --- a/test/e2e/libpod_suite_test.go +++ b/test/e2e/libpod_suite_test.go @@ -31,17 +31,17 @@ func (p *PodmanTestIntegration) PodmanExtraFiles(args []string, extraFiles []*os func (p *PodmanTestIntegration) setDefaultRegistriesConfigEnv() { defaultFile := filepath.Join(INTEGRATION_ROOT, "test/registries.conf") - os.Setenv("REGISTRIES_CONFIG_PATH", defaultFile) + os.Setenv("CONTAINERS_REGISTRIES_CONF", defaultFile) } func (p *PodmanTestIntegration) setRegistriesConfigEnv(b []byte) { outfile := filepath.Join(p.TempDir, "registries.conf") - os.Setenv("REGISTRIES_CONFIG_PATH", outfile) + os.Setenv("CONTAINERS_REGISTRIES_CONF", outfile) ioutil.WriteFile(outfile, b, 0644) } func resetRegistriesConfigEnv() { - os.Setenv("REGISTRIES_CONFIG_PATH", "") + os.Setenv("CONTAINERS_REGISTRIES_CONF", "") } func PodmanTestCreate(tempDir string) *PodmanTestIntegration { diff --git a/test/e2e/login_logout_test.go b/test/e2e/login_logout_test.go index 99876de29..6269bb92b 100644 --- a/test/e2e/login_logout_test.go +++ b/test/e2e/login_logout_test.go @@ -125,15 +125,15 @@ var _ = Describe("Podman login and logout", func() { // Environment is per-process, so this looks very unsafe; actually it seems fine because tests are not // run in parallel unless they opt in by calling t.Parallel(). So don’t do that. - oldRCP, hasRCP := os.LookupEnv("REGISTRIES_CONFIG_PATH") + oldRCP, hasRCP := os.LookupEnv("CONTAINERS_REGISTRIES_CONF") defer func() { if hasRCP { - os.Setenv("REGISTRIES_CONFIG_PATH", oldRCP) + os.Setenv("CONTAINERS_REGISTRIES_CONF", oldRCP) } else { - os.Unsetenv("REGISTRIES_CONFIG_PATH") + os.Unsetenv("CONTAINERS_REGISTRIES_CONF") } }() - os.Setenv("REGISTRIES_CONFIG_PATH", registriesConf.Name()) + os.Setenv("CONTAINERS_REGISTRIES_CONF", registriesConf.Name()) session := podmanTest.Podman([]string{"login", "-u", "podmantest", "-p", "test"}) session.WaitWithDefaultTimeout() diff --git a/test/python/docker/__init__.py b/test/python/docker/__init__.py index da5630eac..59b7987f4 100644 --- a/test/python/docker/__init__.py +++ b/test/python/docker/__init__.py @@ -39,7 +39,7 @@ class Podman(object): self.cmd.append("--root=" + os.path.join(self.anchor_directory, "crio")) self.cmd.append("--runroot=" + os.path.join(self.anchor_directory, "crio-run")) - os.environ["REGISTRIES_CONFIG_PATH"] = os.path.join( + os.environ["CONTAINERS_REGISTRIES_CONF"] = os.path.join( self.anchor_directory, "registry.conf" ) p = configparser.ConfigParser() @@ -50,7 +50,7 @@ class Podman(object): "registries.block": {"registries": "[]"}, } ) - with open(os.environ["REGISTRIES_CONFIG_PATH"], "w") as w: + with open(os.environ["CONTAINERS_REGISTRIES_CONF"], "w") as w: p.write(w) os.environ["CNI_CONFIG_PATH"] = os.path.join( |