mirror of
https://github.com/containers/podman-compose.git
synced 2025-08-09 05:54:34 +02:00
tests/integration: Move test "filesystem" to corresponding dir
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit is contained in:
@ -0,0 +1,47 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from tests.integration.test_podman_compose import podman_compose_path
|
||||
from tests.integration.test_podman_compose import test_path
|
||||
from tests.integration.test_utils import RunSubprocessMixin
|
||||
|
||||
|
||||
class TestFilesystem(unittest.TestCase, RunSubprocessMixin):
|
||||
def test_compose_symlink(self):
|
||||
"""The context of podman-compose.yml should come from the same directory as the file even
|
||||
if it is a symlink
|
||||
"""
|
||||
|
||||
compose_path = os.path.join(test_path(), "filesystem/compose_symlink/docker-compose.yml")
|
||||
|
||||
try:
|
||||
self.run_subprocess_assert_returncode([
|
||||
podman_compose_path(),
|
||||
"-f",
|
||||
compose_path,
|
||||
"up",
|
||||
"-d",
|
||||
"container1",
|
||||
])
|
||||
|
||||
out, _ = self.run_subprocess_assert_returncode([
|
||||
podman_compose_path(),
|
||||
"-f",
|
||||
compose_path,
|
||||
"logs",
|
||||
"container1",
|
||||
])
|
||||
|
||||
# BUG: figure out why cat is called twice
|
||||
self.assertEqual(out, b'data_compose_symlink\ndata_compose_symlink\n')
|
||||
|
||||
finally:
|
||||
out, _ = self.run_subprocess_assert_returncode([
|
||||
podman_compose_path(),
|
||||
"-f",
|
||||
compose_path,
|
||||
"down",
|
||||
])
|
Reference in New Issue
Block a user