mirror of
https://github.com/lxc/incus
synced 2026-08-02 05:26:46 +00:00
tests: Update OpenFGA tests for authorization config keys
Signed-off-by: Piotr Resztak <piotr.resztak@futurfusion.io>
This commit is contained in:
parent
09190e0a68
commit
7fb3207a28
@ -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}"
|
||||
|
||||
@ -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..
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user