Skip to content

Commit

Permalink
set_config
Browse files Browse the repository at this point in the history
  • Loading branch information
AmberCharitos committed Oct 20, 2023
1 parent e38dec5 commit cd2e8a5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions tests/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
connection-password=trino
"""
RANGER_NAME = "ranger-k8s"
GROUP_MANAGEMENT = """
GROUP_MANAGEMENT = """\
relation_6:
users:
- name: user1
Expand Down Expand Up @@ -116,7 +116,7 @@ async def run_connector_action(ops_test, action, params, user):
async def create_group_policy(ops_test, ranger_url):
ranger = RangerClient(ranger_url, RANGER_AUTH)
policy = RangerPolicy()
policy.service = "relation_2"
policy.service = "relation_6"
policy.name = "tpch - catalog, schema, table, column"
policy.resources = {
"schema": RangerPolicyResource({"values": ["*"]}),
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/test_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ async def deploy(ops_test: OpsTest):
timeout=1200,
)
await ops_test.model.integrate(RANGER_NAME, POSTGRES_NAME)
await ops_test.model.set_config({"update-status-hook-interval": "1m"})
await ops_test.model.wait_for_idle(
apps=[POSTGRES_NAME, RANGER_NAME],
status="active",
Expand All @@ -74,11 +75,10 @@ async def deploy(ops_test: OpsTest):
raise_on_blocked=False,
timeout=1200,
)
time.sleep(10)
app = ops_test.model.applications.get("ranger-k8s")
logging.info("configuring ranger values")
await app.set_config({"user-group-configuration": f"{GROUP_MANAGEMENT}"})
time.sleep(10)

logging.info("updating config")
app: Application = ops_test.model.applications.get("ranger-k8s")
app.set_config({"user-group-configuration": GROUP_MANAGEMENT})
await ops_test.model.wait_for_idle(
apps=[APP_NAME, RANGER_NAME],
status="active",
Expand Down

0 comments on commit cd2e8a5

Please sign in to comment.