-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use internal IP whilst in GCE (#232)
* Add util to check if running in GCE env * Use internal IP when running inside GCE * Add ip/port to the msg to ease debugging
- Loading branch information
1 parent
5fba605
commit e93069b
Showing
4 changed files
with
39 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
from dask_cloudprovider.gcp.utils import build_request | ||
import pytest | ||
|
||
from dask_cloudprovider.gcp.utils import build_request, is_inside_gce | ||
|
||
|
||
def test_build_request(): | ||
assert build_request()(None, lambda x: x, "https://example.com") | ||
|
||
|
||
@pytest.mark.xfail( | ||
is_inside_gce(), reason="Fails if you run this test on GCE environment" | ||
) | ||
def test_is_gce_env(): | ||
# Note: this test isn't super valuable, but at least we run the code | ||
assert is_inside_gce() is False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters