summaryrefslogtreecommitdiff
path: root/test/e2e/common_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-03 15:30:39 -0500
committerGitHub <noreply@github.com>2021-02-03 15:30:39 -0500
commit4e1bcf30f3a519490f58d66bc0aef16676f61ae8 (patch)
tree1c385d7d3165aac114aa1d812ecd06cadba89bf6 /test/e2e/common_test.go
parent4a1614e73feee048941296716dd85ceb6d15417d (diff)
parent7e4d696d949f4132c17a9c66c9f24e65b184be4c (diff)
downloadpodman-4e1bcf30f3a519490f58d66bc0aef16676f61ae8.tar.gz
podman-4e1bcf30f3a519490f58d66bc0aef16676f61ae8.tar.bz2
podman-4e1bcf30f3a519490f58d66bc0aef16676f61ae8.zip
Merge pull request #9188 from jwhonce/issues/8865
Report StatusConflict on Pod opt partial failures
Diffstat (limited to 'test/e2e/common_test.go')
-rw-r--r--test/e2e/common_test.go26
1 files changed, 7 insertions, 19 deletions
diff --git a/test/e2e/common_test.go b/test/e2e/common_test.go
index ffa6f1329..61c0cb4fe 100644
--- a/test/e2e/common_test.go
+++ b/test/e2e/common_test.go
@@ -518,27 +518,15 @@ func (s *PodmanSessionIntegration) InspectPodArrToJSON() []define.InspectPodData
// CreatePod creates a pod with no infra container
// it optionally takes a pod name
-func (p *PodmanTestIntegration) CreatePod(name string) (*PodmanSessionIntegration, int, string) {
- var podmanArgs = []string{"pod", "create", "--infra=false", "--share", ""}
- if name != "" {
- podmanArgs = append(podmanArgs, "--name", name)
+func (p *PodmanTestIntegration) CreatePod(options map[string][]string) (*PodmanSessionIntegration, int, string) {
+ var args = []string{"pod", "create", "--infra=false", "--share", ""}
+ for k, values := range options {
+ for _, v := range values {
+ args = append(args, k+"="+v)
+ }
}
- session := p.Podman(podmanArgs)
- session.WaitWithDefaultTimeout()
- return session, session.ExitCode(), session.OutputToString()
-}
-// CreatePod creates a pod with no infra container and some labels.
-// it optionally takes a pod name
-func (p *PodmanTestIntegration) CreatePodWithLabels(name string, labels map[string]string) (*PodmanSessionIntegration, int, string) {
- var podmanArgs = []string{"pod", "create", "--infra=false", "--share", ""}
- if name != "" {
- podmanArgs = append(podmanArgs, "--name", name)
- }
- for labelKey, labelValue := range labels {
- podmanArgs = append(podmanArgs, "--label", fmt.Sprintf("%s=%s", labelKey, labelValue))
- }
- session := p.Podman(podmanArgs)
+ session := p.Podman(args)
session.WaitWithDefaultTimeout()
return session, session.ExitCode(), session.OutputToString()
}