|
36 | 36 | from feast.types import Array, Bytes, Float32, Int32, Int64, String |
37 | 37 | from feast.value_type import ValueType |
38 | 38 | from tests.integration.feature_repos.universal.entities import driver |
| 39 | +from testcontainers.mysql import MySqlContainer |
39 | 40 |
|
40 | 41 | POSTGRES_USER = "test" |
41 | 42 | POSTGRES_PASSWORD = "test" |
@@ -81,19 +82,10 @@ def pg_registry(): |
81 | 82 |
|
82 | 83 | @pytest.fixture(scope="session") |
83 | 84 | def mysql_registry(): |
84 | | - container = ( |
85 | | - DockerContainer("mysql:latest") |
86 | | - .with_exposed_ports(3306) |
87 | | - .with_env("MYSQL_RANDOM_ROOT_PASSWORD", "true") |
88 | | - .with_env("MYSQL_USER", POSTGRES_USER) |
89 | | - .with_env("MYSQL_PASSWORD", POSTGRES_PASSWORD) |
90 | | - .with_env("MYSQL_DATABASE", POSTGRES_DB) |
91 | | - ) |
92 | | - |
| 85 | + container = MySqlContainer("mysql:latest") |
93 | 86 | container.start() |
94 | 87 |
|
95 | | - # The log string uses '8.0.*' since the version might be changed as new Docker images are pushed. |
96 | | - log_string_to_wait_for = "/usr/sbin/mysqld: ready for connections. Version: '(\\d+(\\.\\d+){1,2})' socket: '/var/run/mysqld/mysqld.sock' port: 3306" # noqa: W605 |
| 88 | + log_string_to_wait_for = "ready for connections. Version: '8.2.0' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL" # noqa: W605 |
97 | 89 | waited = wait_for_logs( |
98 | 90 | container=container, |
99 | 91 | predicate=log_string_to_wait_for, |
@@ -125,10 +117,6 @@ def sqlite_registry(): |
125 | 117 | yield SqlRegistry(registry_config, "project", None) |
126 | 118 |
|
127 | 119 |
|
128 | | -@pytest.mark.skipif( |
129 | | - sys.platform == "darwin" and "GITHUB_REF" in os.environ, |
130 | | - reason="does not run on mac github actions", |
131 | | -) |
132 | 120 | @pytest.mark.parametrize( |
133 | 121 | "sql_registry", |
134 | 122 | [ |
@@ -192,10 +180,6 @@ def assert_project_uuid(project, project_uuid, sql_registry): |
192 | 180 | assert project_metadata[0].project_uuid == project_uuid |
193 | 181 |
|
194 | 182 |
|
195 | | -@pytest.mark.skipif( |
196 | | - sys.platform == "darwin" and "GITHUB_REF" in os.environ, |
197 | | - reason="does not run on mac github actions", |
198 | | -) |
199 | 183 | @pytest.mark.parametrize( |
200 | 184 | "sql_registry", |
201 | 185 | [ |
@@ -286,10 +270,6 @@ def test_apply_feature_view_success(sql_registry): |
286 | 270 | sql_registry.teardown() |
287 | 271 |
|
288 | 272 |
|
289 | | -@pytest.mark.skipif( |
290 | | - sys.platform == "darwin" and "GITHUB_REF" in os.environ, |
291 | | - reason="does not run on mac github actions", |
292 | | -) |
293 | 273 | @pytest.mark.parametrize( |
294 | 274 | "sql_registry", |
295 | 275 | [ |
@@ -375,10 +355,6 @@ def location_features_from_push(inputs: pd.DataFrame) -> pd.DataFrame: |
375 | 355 | sql_registry.teardown() |
376 | 356 |
|
377 | 357 |
|
378 | | -@pytest.mark.skipif( |
379 | | - sys.platform == "darwin" and "GITHUB_REF" in os.environ, |
380 | | - reason="does not run on mac github actions", |
381 | | -) |
382 | 358 | @pytest.mark.parametrize( |
383 | 359 | "sql_registry", |
384 | 360 | [ |
@@ -505,10 +481,6 @@ def odfv1(feature_df: pd.DataFrame) -> pd.DataFrame: |
505 | 481 | sql_registry.teardown() |
506 | 482 |
|
507 | 483 |
|
508 | | -@pytest.mark.skipif( |
509 | | - sys.platform == "darwin" and "GITHUB_REF" in os.environ, |
510 | | - reason="does not run on mac github actions", |
511 | | -) |
512 | 484 | @pytest.mark.parametrize( |
513 | 485 | "sql_registry", |
514 | 486 | [ |
@@ -575,10 +547,6 @@ def test_apply_data_source(sql_registry): |
575 | 547 | sql_registry.teardown() |
576 | 548 |
|
577 | 549 |
|
578 | | -@pytest.mark.skipif( |
579 | | - sys.platform == "darwin" and "GITHUB_REF" in os.environ, |
580 | | - reason="does not run on mac github actions", |
581 | | -) |
582 | 550 | @pytest.mark.parametrize( |
583 | 551 | "sql_registry", |
584 | 552 | [ |
@@ -646,10 +614,6 @@ def test_registry_cache(sql_registry): |
646 | 614 | sql_registry.teardown() |
647 | 615 |
|
648 | 616 |
|
649 | | -@pytest.mark.skipif( |
650 | | - sys.platform == "darwin" and "GITHUB_REF" in os.environ, |
651 | | - reason="does not run on mac github actions", |
652 | | -) |
653 | 617 | @pytest.mark.parametrize( |
654 | 618 | "sql_registry", |
655 | 619 | [ |
|
0 commit comments