Skip to content

Commit

Permalink
Ensure spec configuration goes through default factory (#1096)
Browse files Browse the repository at this point in the history
# Fix core ocean test fixture

By ensuring that the configuration goes through the default_factory
  • Loading branch information
erikzaadi authored Oct 23, 2024
1 parent 4fec991 commit ac9347f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm

<!-- towncrier release notes start -->

## 0.12.7 (2024-10-23)


### Bug Fixes

- Fixed get_integration_ocean_app test fixture configuration injection (0.12.7)


## 0.12.6 (2024-10-20)


Expand Down
7 changes: 5 additions & 2 deletions port_ocean/tests/helpers/ocean_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from yaml import safe_load

from port_ocean.bootstrap import create_default_app
from port_ocean.config.dynamic import default_config_factory
from port_ocean.core.handlers.port_app_config.models import ResourceConfig
from port_ocean.core.ocean_types import RESYNC_RESULT
from port_ocean.ocean import Ocean
Expand All @@ -16,8 +17,9 @@ def get_integration_ocean_app(
integration_path: str, config_overrides: Union[Dict[str, Any], None] = None
) -> Ocean:
spec_file = get_spec_file(Path(integration_path))

config_factory = None if not spec_file else spec_file.get("configurations", [])
config_factory = None
if spec_file is not None:
config_factory = default_config_factory(spec_file.get("configurations", []))

default_app = create_default_app(
integration_path,
Expand All @@ -32,6 +34,7 @@ def get_integration_ocean_app(
},
},
)

main_path = f"{integration_path}/main.py"
sys.path.append(integration_path)
app_module = load_module(main_path)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "port-ocean"
version = "0.12.6"
version = "0.12.7"
description = "Port Ocean is a CLI tool for managing your Port projects."
readme = "README.md"
homepage = "https://app.getport.io"
Expand Down

0 comments on commit ac9347f

Please sign in to comment.