This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package agentprotocol
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestHelloRejectsMutationCapability(t *testing.T) {
|
||||
now := time.Now().UTC()
|
||||
hello := Hello{Protocol: Version, AgentID: "agent-1", ObservedAt: now, Capabilities: []Capability{{ID: "containers.read", Version: Version, ReadOnly: false}}}
|
||||
if err := hello.Validate(now); err == nil {
|
||||
t.Fatal("expected mutation capability rejection")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user