Skip to content

Commit dbbd695

Browse files
authored
Merge pull request #1008 from mokibit/automate-deps-test
tests/integration: Automate manual `deps` test
2 parents 1b1d3d8 + 3c9c18c commit dbbd695

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

tests/integration/deps/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
import os
3+
import unittest
4+
5+
from tests.integration.test_podman_compose import podman_compose_path
6+
from tests.integration.test_podman_compose import test_path
7+
from tests.integration.test_utils import RunSubprocessMixin
8+
9+
10+
def compose_yaml_path():
11+
return os.path.join(os.path.join(test_path(), "deps"), "docker-compose.yaml")
12+
13+
14+
class TestComposeDeps(unittest.TestCase, RunSubprocessMixin):
15+
def test_deps(self):
16+
try:
17+
output, error = self.run_subprocess_assert_returncode([
18+
podman_compose_path(),
19+
"-f",
20+
compose_yaml_path(),
21+
"run",
22+
"--rm",
23+
"sleep",
24+
"/bin/sh",
25+
"-c",
26+
"wget -O - http://web:8000/hosts",
27+
])
28+
self.assertIn(b"HTTP request sent, awaiting response... 200 OK", output)
29+
self.assertIn(b"deps_web_1", output)
30+
finally:
31+
self.run_subprocess_assert_returncode([
32+
podman_compose_path(),
33+
"-f",
34+
compose_yaml_path(),
35+
"down",
36+
])

0 commit comments

Comments
 (0)