Wideband autonomous SDR analysis engine forked from sdr-visual-suite
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

31 linhas
1.0KB

  1. package pipeline
  2. import "testing"
  3. func TestSurveillanceDetectionPolicyAuto(t *testing.T) {
  4. policy := Policy{
  5. Mode: "wideband-balanced",
  6. Profile: "wideband-balanced",
  7. Intent: "wideband-surveillance",
  8. SurveillanceStrategy: "multi-resolution",
  9. }
  10. policy.SurveillanceDerivedDetection = "auto"
  11. got := SurveillanceDetectionPolicyFromPolicy(policy)
  12. if !got.DerivedDetectionEnabled {
  13. t.Fatalf("expected auto policy to enable derived detection, got %+v", got)
  14. }
  15. policy.Profile = "archive"
  16. policy.Intent = "archive-and-triage"
  17. got = SurveillanceDetectionPolicyFromPolicy(policy)
  18. if got.DerivedDetectionEnabled {
  19. t.Fatalf("expected archive policy to disable derived detection, got %+v", got)
  20. }
  21. policy = Policy{SurveillanceStrategy: "single-resolution", SurveillanceDerivedDetection: "auto"}
  22. got = SurveillanceDetectionPolicyFromPolicy(policy)
  23. if got.DerivedDetectionEnabled {
  24. t.Fatalf("expected single-resolution to disable derived detection, got %+v", got)
  25. }
  26. }