skypilot-org / skypilot

SkyPilot: Run AI and batch jobs on any infra (Kubernetes or 12+ clouds). Get unified execution, cost savings, and high GPU availability via a simple interface.
https://skypilot.readthedocs.io
Apache License 2.0
6.81k stars 513 forks source link

[smoke] if --generic-cloud is set, force enable that cloud #4335

Closed cg505 closed 1 week ago

cg505 commented 1 week ago

Before, if GCP was not enabled for smoke tests, pytest tests/test_smoke.py --generic-cloud gcp would just completely ignore the --generic-cloud option and force the test to use the first enabled cloud (currently AWS).

Now, if the cloud provided to --generic-cloud isn't enabled for smoke tests, just enable it, since that's probably what was intended.

Also, if --generic-cloud is not set, use the first actually enabled cloud, not necessarily the first default cloud. (So if you do pytest tests/test_smoke.py --gcp, it will use GCP instead of AWS as the generic cloud.)

Fixes #4327.

Tested (run the relevant ones):