Skip to content

Commit

Permalink
feast-project option (#1125)
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Moskalenko <moskalenko.alexey@gmail.com>
  • Loading branch information
pyalex authored Nov 3, 2020
1 parent 3a634cf commit bd4f625
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/e2e/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def pytest_addoption(parser):
parser.addoption("--redis-cluster", action="store_true")
parser.addoption("--feast-version", action="store")
parser.addoption("--bq-project", action="store")
parser.addoption("--feast-project", action="store", default="default")


def pytest_runtest_setup(item):
Expand Down
11 changes: 8 additions & 3 deletions tests/e2e/fixtures/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def feast_client(
enable_auth,
):
if pytestconfig.getoption("env") == "local":
return Client(
c = Client(
core_url=f"{feast_core[0]}:{feast_core[1]}",
serving_url=f"{feast_serving[0]}:{feast_serving[1]}",
spark_launcher="standalone",
Expand All @@ -36,8 +36,8 @@ def feast_client(
),
)

if pytestconfig.getoption("env") == "gcloud":
return Client(
elif pytestconfig.getoption("env") == "gcloud":
c = Client(
core_url=f"{feast_core[0]}:{feast_core[1]}",
serving_url=f"{feast_serving[0]}:{feast_serving[1]}",
spark_launcher="dataproc",
Expand All @@ -52,6 +52,11 @@ def feast_client(
local_staging_path, "historical_output"
),
)
else:
raise KeyError(f"Unknown environment {pytestconfig.getoption('env')}")

c.set_project(pytestconfig.getoption("feast_project"))
return c


@pytest.fixture(scope="session")
Expand Down

0 comments on commit bd4f625

Please sign in to comment.