omit gopass usage during tests

This commit is contained in:
Michael Jerger 2023-05-19 16:49:57 +02:00
parent 816fcfdaa7
commit 93fef828f6
3 changed files with 11 additions and 2 deletions

View file

@ -12,6 +12,9 @@ def test_c4k_build(tmp_path):
str_tmp_path = str(tmp_path)
project = Project(str_tmp_path, name="name")
os.environ["C4K_GRAFANA_CLOUD_USER"] = "user"
os.environ["C4K_GRAFANA_CLOUD_PASSWORD"] = "password"
sut = C4kBuild(
project,
devops_config(
@ -27,7 +30,6 @@ def test_c4k_build(tmp_path):
}
),
)
sut.init_service.credentials_api = CredentialsApiMock({})
sut.initialize_build_dir()
assert sut.build_path() == f"{str_tmp_path}/target/name/c4k-test"

View file

@ -5,9 +5,10 @@ from src.main.python.ddadevops import DevopsBuild
from .domain.helper import devops_config
from .resource_helper import copy_resource
def test_devops_build(tmp_path):
str_tmp_path = str(tmp_path)
copy_resource(Path('package.json'), tmp_path)
copy_resource(Path("package.json"), tmp_path)
project = Project(str_tmp_path, name="name")
devops_build = DevopsBuild(
@ -15,6 +16,8 @@ def test_devops_build(tmp_path):
devops_config(
{
"project_root_path": str_tmp_path,
"build_types": [],
"mixin_types": [],
}
),
)

View file

@ -7,6 +7,10 @@ from .domain.helper import devops_config
def test_devops_docker_build(tmp_path):
str_tmp_path = str(tmp_path)
project = Project(str_tmp_path, name="name")
os.environ["IMAGE_DOCKERHUB_USER"] = "user"
os.environ["IMAGE_DOCKERHUB_PASSWORD"] = "password"
image_build = DevopsImageBuild(
project,
devops_config(