feat: persist and transfer script command payloads
This commit is contained in:
@@ -32,3 +32,18 @@ func TestGlobalSocketAndCLIValueParsing_HP_CTL_11(t *testing.T) {
|
||||
t.Fatalf("zero queue duration = %v", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGlobalRequestIDIsInjectedOnlyForMutations_HP_CTL_12(t *testing.T) {
|
||||
t.Parallel()
|
||||
id := "019c46f1-1d02-7000-8000-0000000000f1"
|
||||
requestID, remaining, err := globalRequestID([]string{"--request-id", id, "run", "client", "echo"})
|
||||
if err != nil || requestID != id || len(remaining) != 3 || remaining[0] != "run" {
|
||||
t.Fatalf("global request ID = %q %#v %v", requestID, remaining, err)
|
||||
}
|
||||
if !readOnlyCommand([]string{"stat", "client"}) || !readOnlyCommand([]string{"storage", "incidents"}) || readOnlyCommand([]string{"run", "client", "echo"}) {
|
||||
t.Fatal("read-only command classification is incorrect")
|
||||
}
|
||||
if _, _, err := globalRequestID([]string{"--request-id", id, "--request-id", id}); err == nil {
|
||||
t.Fatal("duplicate global request IDs accepted")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user