@pytest.mark.usefixtures('os', 'instance')
def test_existing_hosted_zone(hosted_zone_factory, pcluster_config_reader, clusters_factory, vpc_stack, cfn_stacks_factory, key_name, scheduler, region, instance):
    'Test hosted_zone_id is provided in the config file.'
    num_computes = 2
    (hosted_zone_id, domain_name) = hosted_zone_factory()
    cluster_config = pcluster_config_reader(existing_hosted_zone=hosted_zone_id, queue_size=num_computes)
    cluster = clusters_factory(cluster_config, upper_case_cluster_name=True)
    remote_command_executor = RemoteCommandExecutor(cluster)
    scheduler_commands = get_scheduler_commands(scheduler, remote_command_executor)
    _test_mpi(remote_command_executor, slots_per_instance=fetch_instance_slots(region, instance), scheduler=scheduler, region=region, stack_name=cluster.cfn_name, scaledown_idletime=3, verify_scaling=False)
    compute_nodes = scheduler_commands.get_compute_nodes()
    _test_hostname_same_as_nodename(scheduler_commands, remote_command_executor, compute_nodes)
    resolv_conf = remote_command_executor.run_remote_command('cat /etc/resolv.conf').stdout
    assert_that(resolv_conf).contains(((cluster.cfn_name.lower() + '.') + domain_name))
Test hosted_zone_id is provided in the config file.
@pytest.mark.usefixtures('os', 'instance')
def test_existing_hosted_zone(hosted_zone_factory, pcluster_config_reader, clusters_factory, vpc_stack, cfn_stacks_factory, key_name, scheduler, region, instance):
    
    num_computes = 2
    (hosted_zone_id, domain_name) = hosted_zone_factory()
    cluster_config = pcluster_config_reader(existing_hosted_zone=hosted_zone_id, queue_size=num_computes)
    cluster = clusters_factory(cluster_config, upper_case_cluster_name=True)
    remote_command_executor = RemoteCommandExecutor(cluster)
    scheduler_commands = get_scheduler_commands(scheduler, remote_command_executor)
    _test_mpi(remote_command_executor, slots_per_instance=fetch_instance_slots(region, instance), scheduler=scheduler, region=region, stack_name=cluster.cfn_name, scaledown_idletime=3, verify_scaling=False)
    compute_nodes = scheduler_commands.get_compute_nodes()
    _test_hostname_same_as_nodename(scheduler_commands, remote_command_executor, compute_nodes)
    resolv_conf = remote_command_executor.run_remote_command('cat /etc/resolv.conf').stdout
    assert_that(resolv_conf).contains(((cluster.cfn_name.lower() + '.') + domain_name))