def _test_hostname_same_as_nodename(scheduler_commands, remote_command_executor, compute_nodes):
    result = scheduler_commands.submit_command('hostname > /shared/compute_hostname')
    job_id = scheduler_commands.assert_job_submitted(result.stdout)
    scheduler_commands.wait_job_completed(job_id)
    hostname = remote_command_executor.run_remote_command('cat /shared/compute_hostname').stdout
    assert_that(compute_nodes).contains(hostname)
def _test_hostname_same_as_nodename(scheduler_commands, remote_command_executor, compute_nodes):
    result = scheduler_commands.submit_command('hostname > /shared/compute_hostname')
    job_id = scheduler_commands.assert_job_submitted(result.stdout)
    scheduler_commands.wait_job_completed(job_id)
    hostname = remote_command_executor.run_remote_command('cat /shared/compute_hostname').stdout
    assert_that(compute_nodes).contains(hostname)