Skip to content

Commit 068e233

Browse files
committed
fix: broken tests
Signed-off-by: Kanishk Pachauri <[email protected]>
1 parent 23a0845 commit 068e233

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

podman/tests/integration/test_container_create.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,12 @@ def test_container_environment_variables(self):
111111
)
112112
self.containers.append(container)
113113

114-
self.assertEqual(
115-
container.attrs.get('Config', {}).get('Env', []),
116-
[f"{k}={v}" for k, v in env_dict.items()],
117-
)
114+
# Verify that the user-provided environment variables are in the container's configuration
115+
container_env = container.attrs.get('Config', {}).get('Env', [])
116+
for key, value in env_dict.items():
117+
self.assertIn(f"{key}={value}", container_env)
118118

119+
# Start the container and verify the environment variables are set
119120
container.start()
120121
container.wait()
121122
logs = b"\n".join(container.logs()).decode()
@@ -130,11 +131,12 @@ def test_container_environment_variables(self):
130131
)
131132
self.containers.append(container)
132133

133-
self.assertEqual(
134-
container.attrs.get('Config', {}).get('Env', []),
135-
env_list,
136-
)
134+
# Verify that the user-provided environment variables are in the container's configuration
135+
container_env = container.attrs.get('Config', {}).get('Env', [])
136+
for env in env_list:
137+
self.assertIn(env, container_env)
137138

139+
# Start the container and verify the environment variables are set
138140
container.start()
139141
container.wait()
140142
logs = b"\n".join(container.logs()).decode()

0 commit comments

Comments
 (0)