summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Doern <cdoern@redhat.com>2022-07-07 08:51:12 -0400
committerCharlie Doern <cdoern@redhat.com>2022-07-07 09:51:20 -0400
commit0424084b303b2ebb0a0fa28c6dd3f1ef456ce4ba (patch)
tree52dbbee8ec6012fa95db896b5c6cc3a208a96b02
parent48c892324899553415f1a9746c680263898d0ca0 (diff)
downloadpodman-0424084b303b2ebb0a0fa28c6dd3f1ef456ce4ba.tar.gz
podman-0424084b303b2ebb0a0fa28c6dd3f1ef456ce4ba.tar.bz2
podman-0424084b303b2ebb0a0fa28c6dd3f1ef456ce4ba.zip
fix namespace reporting
somehow, #14501 got through CI even though the remote tests fail. The testa are failing due to the PodSpecGenerator not containing the UTSNs entitiy and infra's spec is not yet allowed to be accessed remotely [NO NEW TESTS NEEDED] resolves #14847 Signed-off-by: Charlie Doern <cdoern@redhat.com>
-rw-r--r--pkg/specgen/podspecgen.go2
-rw-r--r--test/e2e/pod_create_test.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/specgen/podspecgen.go b/pkg/specgen/podspecgen.go
index 02ba06be1..64a79f4ee 100644
--- a/pkg/specgen/podspecgen.go
+++ b/pkg/specgen/podspecgen.go
@@ -77,6 +77,8 @@ type PodBasicConfig struct {
// Any containers created within the pod will inherit the pod's userns settings.
// Optional
Userns Namespace `json:"userns,omitempty"`
+ // UtsNs is used to indicate the UTS mode the pod is in
+ UtsNs Namespace `json:"utsns,omitempty"`
// Devices contains user specified Devices to be added to the Pod
Devices []string `json:"pod_devices,omitempty"`
// Sysctl sets kernel parameters for the pod
diff --git a/test/e2e/pod_create_test.go b/test/e2e/pod_create_test.go
index 10a8d52b5..3caae2bd5 100644
--- a/test/e2e/pod_create_test.go
+++ b/test/e2e/pod_create_test.go
@@ -1145,9 +1145,7 @@ ENTRYPOINT ["sleep","99999"]
session = podmanTest.Podman([]string{"run", "-it", "--pod", session.OutputToString(), ALPINE, "printenv", "HOSTNAME"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- if !IsRemote() { // remote hostname will not match os.Hostname()
- Expect(session.OutputToString()).To(ContainSubstring(hostname))
- }
+ Expect(session.OutputToString()).To(ContainSubstring(hostname))
podName := "utsPod"
ns := "ns:/proc/self/ns/"