Skip to content

Commit

Permalink
tried adding back some tests to see if it triggers the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
milocress committed Jan 10, 2024
1 parent d92f9b9 commit 2ad5c2a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

# Add the path of any pytest fixture files you want to make global
pytest_plugins = [
'tests.fixtures.object_stores',
'tests.fixtures.autouse',
'tests.fixtures.models',
'tests.fixtures.data',
Expand Down
39 changes: 39 additions & 0 deletions tests/fixtures/object_stores.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Copyright 2022 MosaicML LLM Foundry authors
# SPDX-License-Identifier: Apache-2.0

import os
import tempfile

from pytest import fixture


@fixture
def gcs_account_credentials():
"""Mocked GCS Credentials for service level account."""
os.environ['GCS_KEY'] = '🗝️'
os.environ['GCS_SECRET'] = '🤫'
yield
del os.environ['GCS_KEY']
del os.environ['GCS_SECRET']


@fixture
def uc_account_credentials():
"""Mocked UC Credentials for service level account."""
os.environ['DATABRICKS_HOST'] = '⛵️'
os.environ['DATABRICKS_TOKEN'] = '😶‍🌫️'
yield
del os.environ['DATABRICKS_HOST']
del os.environ['DATABRICKS_TOKEN']


@fixture
def oci_temp_file():
"""Mocked OCI settings file."""
file = tempfile.NamedTemporaryFile()
os.environ['OCI_CONFIG_FILE'] = file.name

yield

file.close()
del os.environ['OCI_CONFIG_FILE']

0 comments on commit 2ad5c2a

Please sign in to comment.