Public source validation / validate (push) Failing after 3m8s
15 lines
397 B
Go
15 lines
397 B
Go
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")
|
|
}
|
|
}
|