fix(ci): allow server transfer task in telemetry-only mode and align authz reconnect test

This commit is contained in:
Bot
2026-09-04 18:46:58 +08:00
parent 8c481985c2
commit 5d0da5490c
2 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -319,7 +319,7 @@ func (s *Server) IsTelemetryOnly() bool {
} }
func (s *Server) SendTask(task *pb.Task) error { func (s *Server) SendTask(task *pb.Task) error {
if s.IsTelemetryOnly() && task != nil && !IsServiceMonitorType(task.GetType()) { if s.IsTelemetryOnly() && task != nil && !IsServiceMonitorType(task.GetType()) && task.GetType() != TaskTypeServerTransferApply {
return ErrControlDisabled return ErrControlDisabled
} }
h := s.taskStream.Load() h := s.taskStream.Load()
+2
View File
@@ -389,7 +389,9 @@ func runApplyConfigAuthzReconnect(t *testing.T, secret, uuid string) []*pb.Task
"client_uuid", uuid, "client_uuid", uuid,
)), )),
onSend: func(task *pb.Task) { onSend: func(task *pb.Task) {
if task.Type == model.TaskTypeServerTransferApply {
sent = append(sent, task) sent = append(sent, task)
}
}, },
} }
err := NewNezhaHandler().RequestTask(stream) err := NewNezhaHandler().RequestTask(stream)