-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DPE-2278] Add libpq's connection string URI format to
uri
field in…
… relation databag (#545) * set URI on charm * test uri in connection * add await * debug * revert test changes
- Loading branch information
1 parent
eeb6145
commit 6bdee4e
Showing
2 changed files
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,6 +126,7 @@ def test_on_database_requested(harness): | |
"username": user, | ||
"password": "test-password", | ||
"read-only-endpoints": "postgresql-k8s-replicas.None.svc.cluster.local:5432", | ||
"uris": f"postgresql://{user}:[email protected]:5432/{DATABASE}", | ||
"version": POSTGRESQL_VERSION, | ||
"database": f"{DATABASE}", | ||
} | ||
|
@@ -140,6 +141,7 @@ def test_on_database_requested(harness): | |
assert harness.get_relation_data(rel_id, harness.charm.app.name) == { | ||
"data": f'{{"database": "{DATABASE}", "extra-user-roles": "{EXTRA_USER_ROLES}"}}', | ||
"endpoints": "postgresql-k8s-primary.None.svc.cluster.local:5432", | ||
"uris": f"postgresql://{user}:[email protected]:5432/{DATABASE}", | ||
"read-only-endpoints": "postgresql-k8s-replicas.None.svc.cluster.local:5432", | ||
} | ||
|
||
|
@@ -151,6 +153,7 @@ def test_on_database_requested(harness): | |
"data": f'{{"database": "{DATABASE}", "extra-user-roles": "{EXTRA_USER_ROLES}"}}', | ||
"endpoints": "postgresql-k8s-primary.None.svc.cluster.local:5432", | ||
"read-only-endpoints": "postgresql-k8s-replicas.None.svc.cluster.local:5432", | ||
"uris": f"postgresql://{user}:[email protected]:5432/{DATABASE}", | ||
} | ||
|
||
# BlockedStatus due to a PostgreSQLGetPostgreSQLVersionError. | ||
|