File tree Expand file tree Collapse file tree 2 files changed +30
-22
lines changed Expand file tree Collapse file tree 2 files changed +30
-22
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
+ """ "Returns the path to the compose file used for this test module"""
13
+ base_path = os .path .join (test_path (), "build_fail" )
14
+ return os .path .join (base_path , "docker-compose.yml" )
15
+
16
+
17
+ class TestComposeBuildFail (unittest .TestCase , RunSubprocessMixin ):
18
+ def test_build_fail (self ):
19
+ output , error = self .run_subprocess_assert_returncode (
20
+ [
21
+ podman_compose_path (),
22
+ "-f" ,
23
+ compose_yaml_path (),
24
+ "build" ,
25
+ ],
26
+ expected_returncode = 127 ,
27
+ )
28
+ self .assertIn ("RUN this_command_does_not_exist" , str (output ))
29
+ self .assertIn ("this_command_does_not_exist: not found" , str (error ))
30
+ self .assertIn ("while running runtime: exit status 127" , str (error ))
You can’t perform that action at this time.
0 commit comments