diff --git a/src/test/python/domain/test_terraform.py b/src/test/python/domain/test_terraform.py index b67486f..7c2a750 100644 --- a/src/test/python/domain/test_terraform.py +++ b/src/test/python/domain/test_terraform.py @@ -78,6 +78,7 @@ def test_should_calculate_project_vars(): { "do_as_backend": False, "aws_as_backend": False, + "tf_provider_types": ["DIGITALOCEAN", "HETZNER", "AWS"] } ) sut = TerraformDomain(config) @@ -167,6 +168,17 @@ def test_should_calculate_resources_from_package(): "aws_provider_vars.tf", "aws_backend_wkms_vars.tf", "my.file", + "tf_backend_git_backend_vars.tf", + "tf_backend_git_backend.tf", + } == sut.resources_from_package() + + config = devops_config({"tf_provider_types": ["TERRAFORM_BACKEND_GIT"]}) + sut = TerraformDomain(config) + assert { + "versions.tf", + "terraform_build_vars.tf", + "tf_backend_git_backend_vars.tf", + "tf_backend_git_backend.tf", } == sut.resources_from_package() @@ -192,4 +204,4 @@ def test_should_calculate_local_state_handling(): def test_should_use_backend_git(): sut = TerraformDomain(devops_config({})) - assert TerraformDomain.uses_backend_git() \ No newline at end of file + assert sut.uses_backend_git() \ No newline at end of file