-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use pytest servers #8
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
dvc_gs/tests/fixtures.py
Outdated
@pytest.fixture | ||
def make_gs(gs_creds): | ||
def _make_gs(): | ||
return GCP(GCP.get_url(), gs_creds) | ||
def make_gs(request): | ||
if os.getenv("DVC_GS_NO_EMULATOR", None): | ||
|
||
def _make_gs(): | ||
return GCP(GCP.get_url(), "") | ||
|
||
else: | ||
gcs_path = request.getfixturevalue("gcs_path") | ||
fake_gcs_server = request.getfixturevalue("fake_gcs_server") | ||
|
||
def _make_gs(): | ||
return FakeGCP( | ||
str(gcs_path).replace("gcs://", "gs://"), | ||
endpoint_url=fake_gcs_server, | ||
) | ||
|
||
return _make_gs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's do similar to dvc-s3
: have gs
fixture that is always using fake server and have a real_gs
fixture that uses real gs. Tests should use gs
(fake) always, but if one would need to debug stuff, he could use real_gs
manually.
f6dc151
to
e9c956f
Compare
e9c956f
to
f7e40e5
Compare
We were getting errors when setting up Note that |
552e5f5
to
e196309
Compare
e196309
to
2893837
Compare
@dtrifiro Not sure I understand, so is this ready for review/merge? Seems like there are still some cloud credentials issues in the log? |
The cloud credentials messages in the logs are just debug messages, and are related to Note that these credentials are not used to access We could get rid of those warnings by setting |
@dtrifiro So this is ready, right? Feel free to merge then. |
closes #2