mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 09:40:12 +00:00
fix(ci): allow server transfer task in telemetry-only mode and align authz reconnect test
This commit is contained in:
+1
-1
@@ -319,7 +319,7 @@ func (s *Server) IsTelemetryOnly() bool {
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
h := s.taskStream.Load()
|
||||
|
||||
@@ -389,7 +389,9 @@ func runApplyConfigAuthzReconnect(t *testing.T, secret, uuid string) []*pb.Task
|
||||
"client_uuid", uuid,
|
||||
)),
|
||||
onSend: func(task *pb.Task) {
|
||||
if task.Type == model.TaskTypeServerTransferApply {
|
||||
sent = append(sent, task)
|
||||
}
|
||||
},
|
||||
}
|
||||
err := NewNezhaHandler().RequestTask(stream)
|
||||
|
||||
Reference in New Issue
Block a user