tests: Update OpenFGA tests for authorization config keys

Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
This commit is contained in:
Piotr Resztak 2026-07-09 13:32:16 +02:00 committed by Stéphane Graber
parent 09190e0a68
commit 7fb3207a28
No known key found for this signature in database
GPG Key ID: C638974D64792D67
3 changed files with 12 additions and 12 deletions

View File

@ -32,9 +32,9 @@ shutdown_openfga() {
return
fi
incus config unset openfga.api.url
incus config unset openfga.api.token
incus config unset openfga.store.id
incus config unset authorization.openfga.api.url
incus config unset authorization.openfga.api.token
incus config unset authorization.openfga.store.id
pid="$(cat "${TEST_DIR}/openfga/pid")"
kill "${pid}"

View File

@ -3904,9 +3904,9 @@ test_clustering_openfga() {
OPENFGA_STORE_ID="$(fga store create --name "test" | jq -r '.store.id')"
# Configure OpenFGA using the oidc-openfga remote.
INCUS_DIR="${INCUS_ONE_DIR}" incus config set oidc-openfga: openfga.api.url "$(fga_address)"
INCUS_DIR="${INCUS_ONE_DIR}" incus config set oidc-openfga: openfga.api.token "$(fga_token)"
INCUS_DIR="${INCUS_ONE_DIR}" incus config set oidc-openfga: openfga.store.id "${OPENFGA_STORE_ID}"
INCUS_DIR="${INCUS_ONE_DIR}" incus config set oidc-openfga: authorization.openfga.api.url "$(fga_address)"
INCUS_DIR="${INCUS_ONE_DIR}" incus config set oidc-openfga: authorization.openfga.api.token "$(fga_token)"
INCUS_DIR="${INCUS_ONE_DIR}" incus config set oidc-openfga: authorization.openfga.store.id "${OPENFGA_STORE_ID}"
sleep 1
# Add a newline at the end of each line. YAML as weird rules..

View File

@ -25,9 +25,9 @@ test_openfga() {
OPENFGA_STORE_ID="$(fga store create --name "test" | jq -r '.store.id')"
# Configure OpenFGA in Incus.
incus config set openfga.api.url "$(fga_address)"
incus config set openfga.api.token "$(fga_token)"
incus config set openfga.store.id "${OPENFGA_STORE_ID}"
incus config set authorization.openfga.api.url "$(fga_address)"
incus config set authorization.openfga.api.token "$(fga_token)"
incus config set authorization.openfga.store.id "${OPENFGA_STORE_ID}"
# Wait for initial connection to OpenFGA.
sleep 1s
@ -98,9 +98,9 @@ test_openfga() {
kill_oidc
incus config unset oidc.issuer
incus config unset oidc.client.id
incus config unset openfga.api.url
incus config unset openfga.api.token
incus config unset openfga.store.id
incus config unset authorization.openfga.api.url
incus config unset authorization.openfga.api.token
incus config unset authorization.openfga.store.id
incus remote remove oidc-openfga
shutdown_openfga