Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yfairweather committed Jan 19, 2024
1 parent 6bc854f commit 509ee43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions generate_qumulo_cloudformation_template_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def test_add_conditions(self) -> None:

def test_add_params_with_ingress_cidr_param(self) -> None:
template = Template()
add_params(template, True)
add_params(template, True, False)
expected_parameters = [
'ClusterName', 'KeyName', 'InstanceType', 'VpcId', 'SubnetId', 'SgCidr',
'VolumesEncryptionKey', 'IamInstanceProfile'
Expand All @@ -123,7 +123,7 @@ def test_add_params_with_ingress_cidr_param(self) -> None:

def test_add_params_without_ingress_cidr_param(self) -> None:
template = Template()
add_params(template, False)
add_params(template, False, False)
expected_parameters = [
'ClusterName', 'KeyName', 'InstanceType', 'VpcId', 'SubnetId',
'VolumesEncryptionKey', 'IamInstanceProfile'
Expand All @@ -149,7 +149,7 @@ def test_generate_node1_user_data(self) -> None:
backing_spec={'VolumeSize': 5},
)
user_data = generate_node1_user_data(
instances, spec, get_ip_ref=lambda x: x, cluster_name_ref='nameref'
instances, spec, '', get_ip_ref=lambda x: x, cluster_name_ref='nameref'
)

self.assertIn('t2', user_data)
Expand Down Expand Up @@ -194,15 +194,15 @@ def setUp(self) -> None:
def test_nodes_no_secondary_ips(self) -> None:
template = Template()
launch_template = ec2.LaunchTemplate('title')
add_nodes(template, launch_template, 'test', 2, self.spec, 0, 'sg-9')
add_nodes(template, launch_template, 'test', 2, self.spec, 0, 'sg-9', False, '', None)

self.assertEqual(list(template.resources.keys()), self.expected_resources)
self.assertEqual(list(template.outputs.keys()), self.expected_outputs)

def test_nodes_has_secondary_ips(self) -> None:
template = Template()
launch_template = ec2.LaunchTemplate('title')
add_nodes(template, launch_template, 'test', 2, self.spec, 1, 'sg-9')
add_nodes(template, launch_template, 'test', 2, self.spec, 1, 'sg-9', False, '', None)

self.assertEqual(list(template.resources.keys()), self.expected_resources)

Expand Down

0 comments on commit 509ee43

Please sign in to comment.