D65 = A: reboot_guest joins the agent's closed operator-action list — guards (busy controller file, heavy gate, jobs, lock, parked, 1/hour, the brake), result with both times, GET /guest/operator-reboot for the household line; one read-only sudo vector
gates / gates (push) Successful in 33s
gates / gates (push) Successful in 33s
This commit is contained in:
1 parent
bdea4694a4
commit
ca15a31690
10 files changed
+697
-8
No files matched your search
@@ -71,7 +71,7 @@ func waitResult(t *testing.T, s *Server, id int64) hub.OperatorActionResult {
|
||||
|
||||
// RED-PROOF: seen failing before the list existed (build failure, then the names).
|
||||
func TestOpActions_AgentClosedList(t *testing.T) {
|
||||
if got, want := OperatorActionNames(), []string{"restart_controller"}; !reflect.DeepEqual(got, want) {
|
||||
if got, want := OperatorActionNames(), []string{"reboot_guest", "restart_controller"}; !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("the agent's operator actions = %v, want exactly %v — a new verb needs the operator's word", got, want)
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ func TestOpActions_AgentClosedList(t *testing.T) {
|
||||
func TestOpActions_UnknownOrBadArgIsRefused(t *testing.T) {
|
||||
s, ex, _, _, _, _ := opServer(t, "running")
|
||||
s.OnEnvelope(context.Background(), env(
|
||||
hub.OperatorAction{ID: 1, Action: "reboot_guest", Arg: "9201"},
|
||||
hub.OperatorAction{ID: 1, Action: "reboot_host", Arg: "9201"}, // never on the list: only the guest is rebooted
|
||||
hub.OperatorAction{ID: 2, Action: "restart_controller", Arg: "abc"},
|
||||
hub.OperatorAction{ID: 3, Action: "restart_controller", Arg: "9202"}, // not provisioned here
|
||||
))
|
||||
|
||||
Reference in new issue
Block a user