Skip to content

Commit

Permalink
Test OCI Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dudyas6 committed Jan 14, 2025
1 parent 8edb97e commit db189ce
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,9 @@ deploy_nodes_with_install: start_load_balancer
deploy_nodes: start_load_balancer
TEST_TEARDOWN=no TEST=./src/tests/test_targets.py TEST_FUNC=test_target_deploy_nodes $(MAKE) test

deploy_nodes_oci: start_load_balancer
TEST_TEARDOWN=no TEST=./src/tests/test_targets.py TEST_FUNC=test_target_deploy_nodes_oci $(MAKE) test

deploy_nodes_with_networking: start_load_balancer
TEST_TEARDOWN=no TEST=./src/tests/test_targets.py TEST_FUNC=test_target_deploy_networking_with_nodes $(MAKE) test

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def prepare_nodes(self) -> None:
namespace = self._create_bucket(bucket_name)
self._upload_file_to_bucket(self._entity_config.iso_download_path, namespace, bucket_name)
url_path = self._create_pre_authenticated(
f"preauth-{self._entity_config.cluster_id}", self._entity_config.iso_download_path, namespace, bucket_name
f"preauth-{self._entity_config.cluster_id}", self._entity_config.iso_download_path, namespace, bucket_name
)

terraform_variables = self._terraform_variables(
Expand All @@ -474,7 +474,7 @@ def prepare_nodes(self) -> None:
self._config.oci_infrastructure_zip_file,
terraform_variables,
)
terraform_output = self._apply_job_from_stack(stack_id, random_name("job-"))
terraform_output = self._apply_job_from_stack(stack_id, f"apply-job-{self._entity_config.cluster_id}")
self._upload_data_to_bucket(
terraform_output, f"terraform-output-{self._entity_config.cluster_id}.yaml", namespace, bucket_name
)
Expand Down
5 changes: 5 additions & 0 deletions src/tests/test_targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ class TestMakefileTargets(BaseTest):
def test_target_deploy_nodes(self, cluster):
cluster.prepare_nodes()

@JunitTestSuite()
def test_target_deploy_nodes_oci(self, cluster):
cluster.generate_and_download_infra_env()
cluster.nodes.prepare_nodes()

@JunitTestSuite()
def test_target_deploy_networking_with_nodes(self, cluster):
cluster.prepare_for_installation()
Expand Down

0 comments on commit db189ce

Please sign in to comment.