Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLN: split #1928, refactor render test #2246

Merged
merged 7 commits into from
Apr 5, 2024
Merged
19 changes: 6 additions & 13 deletions tests/tests_unit/test_render.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os

from _nebari.stages.bootstrap import CiEnum
from nebari import schema
from nebari.plugins import nebari_plugin_manager


Expand All @@ -22,18 +21,12 @@ def test_render_config(nebari_render):
"03-kubernetes-initialize",
}.issubset(os.listdir(output_directory / "stages"))

if config.provider == schema.ProviderEnum.do:
assert (output_directory / "stages" / "01-terraform-state/do").is_dir()
assert (output_directory / "stages" / "02-infrastructure/do").is_dir()
elif config.provider == schema.ProviderEnum.aws:
assert (output_directory / "stages" / "01-terraform-state/aws").is_dir()
assert (output_directory / "stages" / "02-infrastructure/aws").is_dir()
elif config.provider == schema.ProviderEnum.gcp:
assert (output_directory / "stages" / "01-terraform-state/gcp").is_dir()
assert (output_directory / "stages" / "02-infrastructure/gcp").is_dir()
elif config.provider == schema.ProviderEnum.azure:
assert (output_directory / "stages" / "01-terraform-state/azure").is_dir()
assert (output_directory / "stages" / "02-infrastructure/azure").is_dir()
assert (
output_directory / "stages" / f"01-terraform-state/{config.provider.value}"
).is_dir()
assert (
output_directory / "stages" / f"02-infrastructure/{config.provider.value}"
).is_dir()

if config.ci_cd.type == CiEnum.github_actions:
assert (output_directory / ".github/workflows/").is_dir()
Expand Down