File tree Expand file tree Collapse file tree 2 files changed +38
-5
lines changed
Expand file tree Collapse file tree 2 files changed +38
-5
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: GPL-2.0
2+
3+ import os
4+ import unittest
5+
6+ from tests .integration .test_podman_compose import podman_compose_path
7+ from tests .integration .test_podman_compose import test_path
8+ from tests .integration .test_utils import RunSubprocessMixin
9+
10+
11+ def compose_yaml_path ():
12+ return os .path .join (os .path .join (test_path (), "env-tests" ), "container-compose.yml" )
13+
14+
15+ class TestComposeEnv (unittest .TestCase , RunSubprocessMixin ):
16+ """Test that inline environment variable overrides environment variable from compose file."""
17+
18+ def test_env (self ):
19+ try :
20+ output , _ = self .run_subprocess_assert_returncode ([
21+ podman_compose_path (),
22+ "-f" ,
23+ compose_yaml_path (),
24+ "run" ,
25+ "-l" ,
26+ "monkey" ,
27+ "-e" ,
28+ "ZZVAR1=myval2" ,
29+ "env-test" ,
30+ ])
31+ self .assertIn ("ZZVAR1='myval2'" , str (output ))
32+ finally :
33+ self .run_subprocess_assert_returncode ([
34+ podman_compose_path (),
35+ "-f" ,
36+ compose_yaml_path (),
37+ "down" ,
38+ ])
You can’t perform that action at this time.
0 commit comments