Skip to content

Commit f180ce3

Browse files
committed
feast-project option
Signed-off-by: Oleksii Moskalenko <moskalenko.alexey@gmail.com>
1 parent 3a634cf commit f180ce3

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

tests/e2e/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def pytest_addoption(parser):
2323
parser.addoption("--redis-cluster", action="store_true")
2424
parser.addoption("--feast-version", action="store")
2525
parser.addoption("--bq-project", action="store")
26+
parser.addoption("--feast-project", action="store", default="default")
2627

2728

2829
def pytest_runtest_setup(item):

tests/e2e/fixtures/client.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def feast_client(
2121
enable_auth,
2222
):
2323
if pytestconfig.getoption("env") == "local":
24-
return Client(
24+
c = Client(
2525
core_url=f"{feast_core[0]}:{feast_core[1]}",
2626
serving_url=f"{feast_serving[0]}:{feast_serving[1]}",
2727
spark_launcher="standalone",
@@ -36,8 +36,8 @@ def feast_client(
3636
),
3737
)
3838

39-
if pytestconfig.getoption("env") == "gcloud":
40-
return Client(
39+
elif pytestconfig.getoption("env") == "gcloud":
40+
c = Client(
4141
core_url=f"{feast_core[0]}:{feast_core[1]}",
4242
serving_url=f"{feast_serving[0]}:{feast_serving[1]}",
4343
spark_launcher="dataproc",
@@ -52,6 +52,11 @@ def feast_client(
5252
local_staging_path, "historical_output"
5353
),
5454
)
55+
else:
56+
raise KeyError(f"Unknown environment {pytestconfig.getoption('env')}")
57+
58+
c.set_project(pytestconfig.getoption("feast_project"))
59+
return c
5560

5661

5762
@pytest.fixture(scope="session")

0 commit comments

Comments
 (0)