1
0
mirror of https://github.com/offen/docker-volume-backup.git synced 2025-11-23 21:44:40 +02:00

Fall back to default behavior when deployed to a worker node (#593)

* Add test demonstrating failure when running on worker node

* Consider manager status when checking for swarm related features

* Update documentation
This commit is contained in:
Frederik Ring
2025-06-09 14:19:18 +02:00
committed by GitHub
parent 5291c5cc1c
commit 0ce19a4ff2
9 changed files with 131 additions and 7 deletions

View File

@@ -30,13 +30,26 @@ func TestIsSwarm(t *testing.T) {
&mockInfoClient{
result: system.Info{
Swarm: swarm.Info{
LocalNodeState: swarm.LocalNodeStateActive,
LocalNodeState: swarm.LocalNodeStateActive,
ControlAvailable: true,
},
},
},
true,
false,
},
{
"worker",
&mockInfoClient{
result: system.Info{
Swarm: swarm.Info{
LocalNodeState: swarm.LocalNodeStateActive,
},
},
},
false,
false,
},
{
"compose",
&mockInfoClient{