mirror of https://github.com/containers/podman.git
				
				
				
			Merge pull request #1714 from giuseppe/fix-rootless-tests
tests: fix rootless tests with an updated runc
This commit is contained in:
		
						commit
						4f8ea99603
					
				|  | @ -122,7 +122,6 @@ packages: | ||||||
|     - python3-varlink |     - python3-varlink | ||||||
|     - python3-dateutil |     - python3-dateutil | ||||||
|     - python3-psutil |     - python3-psutil | ||||||
|     - https://kojipkgs.fedoraproject.org//packages/runc/1.0.0/55.dev.git578fe65.fc28/x86_64/runc-1.0.0-55.dev.git578fe65.fc28.x86_64.rpm |  | ||||||
| 
 | 
 | ||||||
| tests: | tests: | ||||||
|     - sed 's/^expand-check.*/expand-check=0/g' -i /etc/selinux/semanage.conf |     - sed 's/^expand-check.*/expand-check=0/g' -i /etc/selinux/semanage.conf | ||||||
|  |  | ||||||
|  | @ -17,7 +17,7 @@ RUN dnf -y install btrfs-progs-devel \ | ||||||
|               libseccomp-devel \ |               libseccomp-devel \ | ||||||
|               libselinux-devel \ |               libselinux-devel \ | ||||||
|               skopeo-containers \ |               skopeo-containers \ | ||||||
|               https://kojipkgs.fedoraproject.org//packages/runc/1.0.0/55.dev.git578fe65.fc28/x86_64/runc-1.0.0-55.dev.git578fe65.fc28.x86_64.rpm \ |               runc \ | ||||||
|               make \ |               make \ | ||||||
|               ostree-devel \ |               ostree-devel \ | ||||||
|               python \ |               python \ | ||||||
|  |  | ||||||
|  | @ -56,6 +56,7 @@ var _ = Describe("Podman rootless", func() { | ||||||
| 		commands := []string{"help", "version"} | 		commands := []string{"help", "version"} | ||||||
| 		for _, v := range commands { | 		for _, v := range commands { | ||||||
| 			env := os.Environ() | 			env := os.Environ() | ||||||
|  | 			env = append(env, "USER=foo") | ||||||
| 			cmd := podmanTest.PodmanAsUser([]string{v}, 1000, 1000, env) | 			cmd := podmanTest.PodmanAsUser([]string{v}, 1000, 1000, env) | ||||||
| 			cmd.WaitWithDefaultTimeout() | 			cmd.WaitWithDefaultTimeout() | ||||||
| 			Expect(cmd.ExitCode()).To(Equal(0)) | 			Expect(cmd.ExitCode()).To(Equal(0)) | ||||||
|  | @ -122,6 +123,7 @@ var _ = Describe("Podman rootless", func() { | ||||||
| 			env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir)) | 			env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir)) | ||||||
| 			env = append(env, fmt.Sprintf("HOME=%s", home)) | 			env = append(env, fmt.Sprintf("HOME=%s", home)) | ||||||
| 			env = append(env, "PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS=1") | 			env = append(env, "PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS=1") | ||||||
|  | 			env = append(env, "USER=foo") | ||||||
| 
 | 
 | ||||||
| 			cmd := rootlessTest.PodmanAsUser([]string{"pod", "create", "--infra=false"}, 1000, 1000, env) | 			cmd := rootlessTest.PodmanAsUser([]string{"pod", "create", "--infra=false"}, 1000, 1000, env) | ||||||
| 			cmd.WaitWithDefaultTimeout() | 			cmd.WaitWithDefaultTimeout() | ||||||
|  | @ -152,6 +154,7 @@ var _ = Describe("Podman rootless", func() { | ||||||
| 		env := os.Environ() | 		env := os.Environ() | ||||||
| 		env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir)) | 		env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir)) | ||||||
| 		env = append(env, fmt.Sprintf("HOME=%s", home)) | 		env = append(env, fmt.Sprintf("HOME=%s", home)) | ||||||
|  | 		env = append(env, "USER=foo") | ||||||
| 		cmd := podmanTest.PodmanAsUser([]string{"search", "docker.io/busybox"}, 1000, 1000, env) | 		cmd := podmanTest.PodmanAsUser([]string{"search", "docker.io/busybox"}, 1000, 1000, env) | ||||||
| 		cmd.WaitWithDefaultTimeout() | 		cmd.WaitWithDefaultTimeout() | ||||||
| 		Expect(cmd.ExitCode()).To(Equal(0)) | 		Expect(cmd.ExitCode()).To(Equal(0)) | ||||||
|  | @ -165,6 +168,7 @@ var _ = Describe("Podman rootless", func() { | ||||||
| 			env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir)) | 			env = append(env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", xdgRuntimeDir)) | ||||||
| 			env = append(env, fmt.Sprintf("HOME=%s", home)) | 			env = append(env, fmt.Sprintf("HOME=%s", home)) | ||||||
| 			env = append(env, "PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS=1") | 			env = append(env, "PODMAN_ALLOW_SINGLE_ID_MAPPING_IN_USERNS=1") | ||||||
|  | 			env = append(env, "USER=foo") | ||||||
| 
 | 
 | ||||||
| 			allArgs := append([]string{"run"}, args...) | 			allArgs := append([]string{"run"}, args...) | ||||||
| 			allArgs = append(allArgs, "--rootfs", mountPath, "echo", "hello") | 			allArgs = append(allArgs, "--rootfs", mountPath, "echo", "hello") | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue