Skip to content

Commit

Permalink
ci: Add example test for sql registry using in-memory sqlite (feast-d…
Browse files Browse the repository at this point in the history
…ev#3012)

Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals authored Aug 4, 2022
1 parent 66c4338 commit d4af068
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions sdk/python/tests/integration/registration/test_sql_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,28 @@ def mysql_registry():
container.stop()


@pytest.fixture(scope="session")
def sqlite_registry():

registry_config = RegistryConfig(
registry_type="sql",
path="sqlite://",
)

yield SqlRegistry(registry_config, None)


@pytest.mark.skipif(
sys.platform == "darwin" and "GITHUB_REF" in os.environ,
reason="does not run on mac github actions",
)
@pytest.mark.parametrize(
"sql_registry",
[lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
[
lazy_fixture("mysql_registry"),
lazy_fixture("pg_registry"),
lazy_fixture("sqlite_registry"),
],
)
def test_apply_entity_success(sql_registry):
entity = Entity(
Expand Down Expand Up @@ -174,7 +189,11 @@ def assert_project_uuid(project, project_uuid, sql_registry):
)
@pytest.mark.parametrize(
"sql_registry",
[lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
[
lazy_fixture("mysql_registry"),
lazy_fixture("pg_registry"),
lazy_fixture("sqlite_registry"),
],
)
def test_apply_feature_view_success(sql_registry):
# Create Feature Views
Expand Down Expand Up @@ -250,7 +269,11 @@ def test_apply_feature_view_success(sql_registry):
)
@pytest.mark.parametrize(
"sql_registry",
[lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
[
lazy_fixture("mysql_registry"),
lazy_fixture("pg_registry"),
lazy_fixture("sqlite_registry"),
],
)
def test_apply_on_demand_feature_view_success(sql_registry):
# Create Feature Views
Expand Down Expand Up @@ -334,7 +357,11 @@ def location_features_from_push(inputs: pd.DataFrame) -> pd.DataFrame:
)
@pytest.mark.parametrize(
"sql_registry",
[lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
[
lazy_fixture("mysql_registry"),
lazy_fixture("pg_registry"),
lazy_fixture("sqlite_registry"),
],
)
@pytest.mark.parametrize(
"request_source_schema",
Expand Down Expand Up @@ -462,7 +489,11 @@ def odfv1(feature_df: pd.DataFrame) -> pd.DataFrame:
@pytest.mark.integration
@pytest.mark.parametrize(
"sql_registry",
[lazy_fixture("mysql_registry"), lazy_fixture("pg_registry")],
[
lazy_fixture("mysql_registry"),
lazy_fixture("pg_registry"),
lazy_fixture("sqlite_registry"),
],
)
def test_apply_data_source(sql_registry):
# Create Feature Views
Expand Down

0 comments on commit d4af068

Please sign in to comment.