Skip to content

Source tarball on PyPi is missing sample directory #28

@glaubitz

Description

@glaubitz

It's currently not possible to run the testsuite using the source tarball from PyPi due to the missing sample directory in this tarball.

The testsuite fails with:

[    7s] test_service_with_deploy_rollback_config (tests.service.test_service_deploy.TestComposeServiceDeploy) ... ok
[    7s] test_service_with_deploy_update_config (tests.service.test_service_deploy.TestComposeServiceDeploy) ... ok
[    7s] test_service_with_no_deploy (tests.service.test_service_deploy.TestComposeServiceDeploy) ... ok
[    7s] tests.service.test_service_environment (unittest.loader._FailedTest) ... ERROR
[    7s] test_service_with_list_environment_file (tests.service.test_service_environment_file.TestComposeServiceEnvironmentFile) ... ERROR
[    7s] test_service_with_resolved_environment_variables (tests.service.test_service_environment_file.TestComposeServiceEnvironmentFile) ... ERROR
[    7s] test_service_with_single_environment_file (tests.service.test_service_environment_file.TestComposeServiceEnvironmentFile) ... ERROR
[    7s] test_service_with_single_environment_file (tests.service.test_service_network.TestComposeServiceEnvironmentFile) ... ok
[    7s] test_service_with_external_secret (tests.service.test_service_secret_file.TestComposeServiceSecretsFile) ... ok
[    7s] test_service_with_long_syntax (tests.service.test_service_secret_file.TestComposeServiceSecretsFile) ... ERROR
[    7s] test_service_with_single_secret (tests.service.test_service_secret_file.TestComposeServiceSecretsFile) ... ERROR
[    7s] 
[    7s] ======================================================================
[    7s] ERROR: tests.service.test_service_environment (unittest.loader._FailedTest)
[    7s] ----------------------------------------------------------------------
[    7s] ImportError: Failed to import test module: tests.service.test_service_environment
[    7s] Traceback (most recent call last):
[    7s]   File "/usr/lib64/python3.9/unittest/loader.py", line 436, in _find_test_path
[    7s]     module = self._get_module_from_name(name)
[    7s]   File "/usr/lib64/python3.9/unittest/loader.py", line 377, in _get_module_from_name
[    7s]     __import__(name)
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/tests/service/test_service_environment.py", line 3, in <module>
[    7s]     from src.pycomposefile import compose_file
[    7s] ModuleNotFoundError: No module named 'src'
[    7s] 
[    7s] 
[    7s] ======================================================================
[    7s] ERROR: test_service_with_list_environment_file (tests.service.test_service_environment_file.TestComposeServiceEnvironmentFile)
[    7s] ----------------------------------------------------------------------
[    7s] Traceback (most recent call last):
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/tests/service/test_service_environment_file.py", line 17, in test_service_with_list_environment_file
[    7s]     environment_from_file = compose_file.services["frontend"].env_file.readFile()
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/pycomposefile/service/service_environment.py", line 14, in readFile
[    7s]     f = open(file_name, "r")
[    7s] FileNotFoundError: [Errno 2] No such file or directory: './sample/common.env'
[    7s] 
[    7s] ======================================================================
[    7s] ERROR: test_service_with_resolved_environment_variables (tests.service.test_service_environment_file.TestComposeServiceEnvironmentFile)
[    7s] ----------------------------------------------------------------------
[    7s] Traceback (most recent call last):
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/tests/service/test_service_environment_file.py", line 30, in test_service_with_resolved_environment_variables
[    7s]     environment_from_file = compose_file.services["frontend"].resolve_environment_hierarchy()
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/pycomposefile/service/service.py", line 140, in resolve_environment_hierarchy
[    7s]     env_file = self.env_file.readFile()
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/pycomposefile/service/service_environment.py", line 14, in readFile
[    7s]     f = open(file_name, "r")
[    7s] FileNotFoundError: [Errno 2] No such file or directory: './sample/common.env'
[    7s] 
[    7s] ======================================================================
[    7s] ERROR: test_service_with_single_environment_file (tests.service.test_service_environment_file.TestComposeServiceEnvironmentFile)
[    7s] ----------------------------------------------------------------------
[    7s] Traceback (most recent call last):
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/tests/service/test_service_environment_file.py", line 9, in test_service_with_single_environment_file
[    7s]     environment_from_file = compose_file.services["frontend"].env_file.readFile()
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/pycomposefile/service/service_environment.py", line 14, in readFile
[    7s]     f = open(file_name, "r")
[    7s] FileNotFoundError: [Errno 2] No such file or directory: './sample/test.env'
[    7s] 
[    7s] ======================================================================
[    7s] ERROR: test_service_with_long_syntax (tests.service.test_service_secret_file.TestComposeServiceSecretsFile)
[    7s] ----------------------------------------------------------------------
[    7s] Traceback (most recent call last):
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/tests/service/test_service_secret_file.py", line 27, in test_service_with_long_syntax
[    7s]     secret_from_file = compose_file.secrets["my_secret"].file.readFile()
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/pycomposefile/secrets/__init__.py", line 6, in readFile
[    7s]     with open(self, "r") as f:
[    7s] FileNotFoundError: [Errno 2] No such file or directory: './sample/my_secret.txt'
[    7s] 
[    7s] ======================================================================
[    7s] ERROR: test_service_with_single_secret (tests.service.test_service_secret_file.TestComposeServiceSecretsFile)
[    7s] ----------------------------------------------------------------------
[    7s] Traceback (most recent call last):
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/tests/service/test_service_secret_file.py", line 11, in test_service_with_single_secret
[    7s]     secret_from_file = compose_file.secrets["my_secret"].file.readFile()
[    7s]   File "/home/abuild/rpmbuild/BUILD/pycomposefile-0.0.30/pycomposefile/secrets/__init__.py", line 6, in readFile
[    7s]     with open(self, "r") as f:
[    7s] FileNotFoundError: [Errno 2] No such file or directory: './sample/my_secret.txt'
[    7s] 
[    7s] ----------------------------------------------------------------------
[    7s] Ran 67 tests in 0.092s
[    7s] 
[    7s] FAILED (errors=6, skipped=1)
[    7s] error: Bad exit status from /var/tmp/rpm-tmp.cB4M36 (%check)
[    7s] 
[    7s] RPM build errors:
[    7s]     Bad exit status from /var/tmp/rpm-tmp.cB4M36 (%check)
[    7s]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions