🐛 Bug Description
The test setup script configures the Docker plugin after enabling it, which breaks the expected Docker plugin lifecycle.
In scripts/test.sh, the plugin is first enabled with docker plugin enable swarm-external-secrets:temp, and only after that the script tries to update plugin permissions and runtime configuration using docker plugin set. On Docker managed plugins, docker plugin set is intended to be used while the plugin is disabled. Once the plugin is enabled, Docker treats the plugin as active and does not allow configuration changes in the normal flow.
Because this script uses set -e, the first failed docker plugin set command causes the entire script to exit immediately. That means the script fails before the plugin is fully configured for testing, even though the failure is caused by script ordering rather than by Vault connectivity, credentials, or plugin logic.
This makes the script unreliable as a local test/setup helper and can mislead contributors into debugging provider configuration when the real problem is that the plugin was enabled too early.
🔁 Steps to Reproduce
Steps to reproduce the behavior:
- Run
scripts/test.sh.
- Let the script build and create
swarm-external-secrets:temp.
- Let it reach the line that enables the plugin.
- Observe the next
docker plugin set ... commands fail because the plugin is already enabled.
✅ Expected Behavior
The script should configure the plugin first, using docker plugin set while the plugin is disabled, and only then enable the plugin once all required settings and permissions have been applied.
❌ Actual Behavior
The script enables the plugin before applying docker plugin set commands. Docker rejects those configuration changes, and because the script runs with set -e, the script exits before test setup completes.
🧪 Reproducibility
📸 Screenshots / Logs
Relevant script flow in scripts/test.sh:
docker plugin enable swarm-external-secrets:temp
docker plugin set swarm-external-secrets:temp gid=0 uid=0
docker plugin set swarm-external-secrets:temp \
VAULT_ADDR="https://152.53.244.80:8200" \
VAULT_AUTH_METHOD="approle" \
VAULT_ROLE_ID="..." \
VAULT_SECRET_ID="..." \
VAULT_MOUNT_PATH="secret" \
VAULT_ENABLE_ROTATION="true" \
VAULT_ROTATION_INTERVAL="1m"
Because the plugin is already enabled at this point, docker plugin set fails and the script exits.
🐛 Bug Description
The test setup script configures the Docker plugin after enabling it, which breaks the expected Docker plugin lifecycle.
In
scripts/test.sh, the plugin is first enabled withdocker plugin enable swarm-external-secrets:temp, and only after that the script tries to update plugin permissions and runtime configuration usingdocker plugin set. On Docker managed plugins,docker plugin setis intended to be used while the plugin is disabled. Once the plugin is enabled, Docker treats the plugin as active and does not allow configuration changes in the normal flow.Because this script uses
set -e, the first faileddocker plugin setcommand causes the entire script to exit immediately. That means the script fails before the plugin is fully configured for testing, even though the failure is caused by script ordering rather than by Vault connectivity, credentials, or plugin logic.This makes the script unreliable as a local test/setup helper and can mislead contributors into debugging provider configuration when the real problem is that the plugin was enabled too early.
🔁 Steps to Reproduce
Steps to reproduce the behavior:
scripts/test.sh.swarm-external-secrets:temp.docker plugin set ...commands fail because the plugin is already enabled.✅ Expected Behavior
The script should configure the plugin first, using
docker plugin setwhile the plugin is disabled, and only then enable the plugin once all required settings and permissions have been applied.❌ Actual Behavior
The script enables the plugin before applying
docker plugin setcommands. Docker rejects those configuration changes, and because the script runs withset -e, the script exits before test setup completes.🧪 Reproducibility
📸 Screenshots / Logs
Relevant script flow in scripts/test.sh:
Because the plugin is already enabled at this point,
docker plugin setfails and the script exits.