feat: establish secure update foundation
Container-Image veröffentlichen / container (push) v1.4.0 wurde manuell veröffentlicht und verifiziert
Container-Image veröffentlichen / container (push) v1.4.0 wurde manuell veröffentlicht und verifiziert
This commit is contained in:
1 parent
f02ec9977c
commit
bb60c06c0e
28 files changed
+1403
-280
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package main
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestCommandForInvocationKeepsV13ComposeAgentCompatible(t *testing.T) {
|
||||
t.Parallel()
|
||||
tests := []struct {
|
||||
arguments []string
|
||||
want string
|
||||
}{
|
||||
{arguments: []string{"/usr/local/bin/domain-control"}, want: "serve"},
|
||||
{arguments: []string{"/usr/local/bin/domain-control", "update-agent"}, want: "update-agent"},
|
||||
{arguments: []string{"/usr/local/bin/domain-control", "healthcheck"}, want: "healthcheck"},
|
||||
{arguments: []string{"/usr/local/bin/update-agent"}, want: "update-agent"},
|
||||
{arguments: []string{"/usr/local/bin/update-agent", "serve"}, want: "update-agent"},
|
||||
{arguments: []string{"/usr/local/bin/domain-control", "serve", "extra"}, want: "invalid"},
|
||||
{arguments: nil, want: "invalid"},
|
||||
}
|
||||
for _, test := range tests {
|
||||
if got := commandForInvocation(test.arguments); got != test.want {
|
||||
t.Errorf("commandForInvocation(%q) = %q; want %q", test.arguments, got, test.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user