MINOR: Fix Oracle E2E Tests (#17084)

* Fix Oracle E2E Tests

* Fix Checkstyle

* Add link to issue in the reason
This commit is contained in:
IceS2 2024-07-19 10:32:22 +02:00 committed by GitHub
parent 75fcb03041
commit d145341026
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 6 deletions

View File

@ -18,7 +18,7 @@ from http.server import BaseHTTPRequestHandler, HTTPServer
from pathlib import Path from pathlib import Path
# pyright: reportUnusedCallResult=false # pyright: reportUnusedCallResult=false
from typing import List, Optional from typing import List, Optional, Union
from metadata.__version__ import get_metadata_version from metadata.__version__ import get_metadata_version
from metadata.cli.app import run_app from metadata.cli.app import run_app
@ -157,7 +157,7 @@ def metadata(args: Optional[List[str]] = None):
if contains_args.get("debug"): if contains_args.get("debug"):
set_loggers_level(logging.DEBUG) set_loggers_level(logging.DEBUG)
else: else:
log_level: str = contains_args.get("log_level", logging.INFO) log_level: Union[str, int] = contains_args.get("log_level") or logging.INFO
set_loggers_level(log_level) set_loggers_level(log_level)
if path and metadata_workflow and metadata_workflow in RUN_PATH_METHODS: if path and metadata_workflow and metadata_workflow in RUN_PATH_METHODS:

View File

@ -15,6 +15,8 @@ Oracle E2E tests
from typing import List from typing import List
import pytest
from metadata.ingestion.api.status import Status from metadata.ingestion.api.status import Status
from .base.e2e_types import E2EType from .base.e2e_types import E2EType
@ -96,11 +98,11 @@ SELECT * from names
@staticmethod @staticmethod
def fqn_created_table() -> str: def fqn_created_table() -> str:
return "e2e_oracle.default.admin.ADMIN_EMP" return "e2e_oracle.default.admin.admin_emp"
@staticmethod @staticmethod
def _fqn_deleted_table() -> str: def _fqn_deleted_table() -> str:
return "e2e_oracle.default.admin.ADMIN_EMP" return "e2e_oracle.default.admin.admin_emp"
@staticmethod @staticmethod
def get_includes_schemas() -> List[str]: def get_includes_schemas() -> List[str]:
@ -128,12 +130,15 @@ SELECT * from names
@staticmethod @staticmethod
def expected_filtered_table_excludes() -> int: def expected_filtered_table_excludes() -> int:
return 29 return 30
@staticmethod @staticmethod
def expected_filtered_mix() -> int: def expected_filtered_mix() -> int:
return 43 return 43
@pytest.mark.xfail(
reason="Issue Raised: https://github.com/open-metadata/OpenMetadata/issues/17085"
)
def test_create_table_with_profiler(self) -> None: def test_create_table_with_profiler(self) -> None:
# delete table in case it exists # delete table in case it exists
self.delete_table_and_view() self.delete_table_and_view()
@ -240,7 +245,7 @@ SELECT * from names
E2EType.INGEST_DB_FILTER_MIX, E2EType.INGEST_DB_FILTER_MIX,
{ {
"schema": {"includes": self.get_includes_schemas()}, "schema": {"includes": self.get_includes_schemas()},
"table": {"excludes": self.get_includes_tables()}, "table": {"excludes": self.get_excludes_tables()},
}, },
) )