Skip to content

Commit

Permalink
Try to launch detached, doesn't work, need ctrl-c
Browse files Browse the repository at this point in the history
  • Loading branch information
Ultramann committed Jul 8, 2024
1 parent e3e97a3 commit f6ab400
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/test_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,11 +801,17 @@ def test_gcp_mig():
def test_gcp_use_internal_ips():
name = _get_cluster_name()
test_commands = [
f'sky launch -y -c {name} tests/test_yamls/minimal.yaml',
# Launch detached because internal ips will prevent sshing for setup
f'(sky launch -y -s -c {name} tests/test_yamls/minimal.yaml)',
# Wait for the vm to be up
'sleep 20',
# Check network of vm is "default"
(f'gcloud compute instances list --filter=name~"{name}" --format='
'"value(networkInterfaces.network)" | grep "networks/default"'),
# Check no entries in network interfaces access configs,
# where external ips would be
(f'gcloud compute instances list --filter=name~"{name}" --format='
'"value(networkInterfaces.accessConfigs[0].name)" | wc -w | grep 0'),
'"value(networkInterfaces.accessConfigs)" | wc -w | grep 0'),
f'sky down -y {name}',
]
test = Test(
Expand All @@ -821,10 +827,12 @@ def test_gcp_force_enable_external_ips():
name = _get_cluster_name()
test_commands = [
f'sky launch -y -c {name} tests/test_yamls/minimal.yaml',
# Check network of vm is "default"
(f'gcloud compute instances list --filter=name~"{name}" --format='
'"value(networkInterfaces.network)" | grep "networks/default"'),
# Check External NAT in network access configs, corresponds to external ip
(f'gcloud compute instances list --filter=name~"{name}" --format='
'"value(networkInterfaces.accessConfigs[0].name)" | grep "External"'),
'"value(networkInterfaces.accessConfigs[0].name)" | grep "External NAT"'),
f'sky down -y {name}',
]
skypilot_config = 'tests/test_yamls/force_enable_external_ips_config.yaml'
Expand Down

0 comments on commit f6ab400

Please sign in to comment.