Skip to content

Commit

Permalink
resolve rebase errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Natasha Ho committed Jan 5, 2023
1 parent dfe3a73 commit 1e4eb48
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ def _run_sql_migration(self) -> bool:
Returns True if migration was run successfully, else returns false.
"""
try:
process = self._container.exec(
["kratos", "migrate", "sql", "-e", "--config", self._config_file_path, "--yes"],
)
try:
stdout, _ = process.wait_output()
logger.info(f"Successfully executed automigration: {stdout}")
except ExecError as err:
Expand Down
1 change: 1 addition & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def mocked_fqdn(mocker):
return mocked_fqdn


@pytest.fixture()
def mocked_pebble_exec(mocker):
mocked_pebble_exec = mocker.patch("ops.model.Container.exec")
yield mocked_pebble_exec
Expand Down
7 changes: 1 addition & 6 deletions tests/unit/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,7 @@ def test_on_database_changed_when_pebble_is_ready(harness, mocked_pebble_exec_su


@pytest.mark.parametrize("api_type,port", [("admin", "4434"), ("public", "4433")])
def test_ingress_relation_created(
harness, mocked_kubernetes_service_patcher, mocked_fqdn, api_type, port
) -> None:
harness.begin()
harness.set_can_connect(CONTAINER_NAME, True)

def test_ingress_relation_created(harness, mocked_fqdn, api_type, port) -> None:
relation_id = setup_ingress_relation(harness, api_type)
app_data = harness.get_relation_data(relation_id, harness.charm.app)

Expand Down

0 comments on commit 1e4eb48

Please sign in to comment.