@@ -51,7 +51,7 @@ func TestDeployDecision_GetPendingActions(t *testing.T) {
5151 PolicyID : "policy-1" ,
5252 PolicyName : "Test Policy" ,
5353 RuleResults : []* results.RuleEvaluationResult {
54- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
54+ results .NewPendingResult ("approval" , "needs approval" ),
5555 },
5656 },
5757 },
@@ -66,16 +66,16 @@ func TestDeployDecision_GetPendingActions(t *testing.T) {
6666 PolicyID : "policy-1" ,
6767 PolicyName : "Test Policy 1" ,
6868 RuleResults : []* results.RuleEvaluationResult {
69- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
69+ results .NewPendingResult ("approval" , "needs approval" ),
7070 results .NewAllowedResult ("rule passed" ),
7171 },
7272 },
7373 {
7474 PolicyID : "policy-2" ,
7575 PolicyName : "Test Policy 2" ,
7676 RuleResults : []* results.RuleEvaluationResult {
77- results .NewPendingResult ("wait" , "wait" , " waiting for slot" ),
78- results .NewPendingResult ("approval" , "approval" , " another approval" ),
77+ results .NewPendingResult ("wait" , "waiting for slot" ),
78+ results .NewPendingResult ("approval" , "another approval" ),
7979 },
8080 },
8181 },
@@ -91,7 +91,7 @@ func TestDeployDecision_GetPendingActions(t *testing.T) {
9191 PolicyName : "Test Policy" ,
9292 RuleResults : []* results.RuleEvaluationResult {
9393 results .NewDeniedResult ("explicitly denied" ),
94- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
94+ results .NewPendingResult ("approval" , "needs approval" ),
9595 },
9696 },
9797 },
@@ -137,7 +137,7 @@ func TestDeployDecision_CanDeploy(t *testing.T) {
137137 PolicyID : "policy-1" ,
138138 PolicyName : "Test Policy" ,
139139 RuleResults : []* results.RuleEvaluationResult {
140- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
140+ results .NewPendingResult ("approval" , "needs approval" ),
141141 },
142142 },
143143 },
@@ -152,7 +152,7 @@ func TestDeployDecision_CanDeploy(t *testing.T) {
152152 PolicyID : "policy-1" ,
153153 PolicyName : "Test Policy" ,
154154 RuleResults : []* results.RuleEvaluationResult {
155- results .NewPendingResult ("wait" , "wait" , " waiting for slot" ),
155+ results .NewPendingResult ("wait" , "waiting for slot" ),
156156 },
157157 },
158158 },
@@ -212,7 +212,7 @@ func TestDeployDecision_IsPending(t *testing.T) {
212212 PolicyID : "policy-1" ,
213213 PolicyName : "Test Policy" ,
214214 RuleResults : []* results.RuleEvaluationResult {
215- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
215+ results .NewPendingResult ("approval" , "needs approval" ),
216216 },
217217 },
218218 },
@@ -227,7 +227,7 @@ func TestDeployDecision_IsPending(t *testing.T) {
227227 PolicyID : "policy-1" ,
228228 PolicyName : "Test Policy" ,
229229 RuleResults : []* results.RuleEvaluationResult {
230- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
230+ results .NewPendingResult ("approval" , "needs approval" ),
231231 results .NewDeniedResult ("explicitly denied" ),
232232 },
233233 },
@@ -326,7 +326,7 @@ func TestDeployDecision_IsBlocked(t *testing.T) {
326326 PolicyID : "policy-1" ,
327327 PolicyName : "Test Policy" ,
328328 RuleResults : []* results.RuleEvaluationResult {
329- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
329+ results .NewPendingResult ("approval" , "needs approval" ),
330330 },
331331 },
332332 },
@@ -393,7 +393,7 @@ func TestDeployDecision_NeedsApproval(t *testing.T) {
393393 PolicyID : "policy-1" ,
394394 PolicyName : "Test Policy" ,
395395 RuleResults : []* results.RuleEvaluationResult {
396- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
396+ results .NewPendingResult ("approval" , "needs approval" ),
397397 },
398398 },
399399 },
@@ -408,7 +408,7 @@ func TestDeployDecision_NeedsApproval(t *testing.T) {
408408 PolicyID : "policy-1" ,
409409 PolicyName : "Test Policy" ,
410410 RuleResults : []* results.RuleEvaluationResult {
411- results .NewPendingResult ("wait" , "wait" , " waiting for slot" ),
411+ results .NewPendingResult ("wait" , "waiting for slot" ),
412412 },
413413 },
414414 },
@@ -423,8 +423,8 @@ func TestDeployDecision_NeedsApproval(t *testing.T) {
423423 PolicyID : "policy-1" ,
424424 PolicyName : "Test Policy" ,
425425 RuleResults : []* results.RuleEvaluationResult {
426- results .NewPendingResult ("wait" , "wait" , " waiting for slot" ),
427- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
426+ results .NewPendingResult ("wait" , "waiting for slot" ),
427+ results .NewPendingResult ("approval" , "needs approval" ),
428428 },
429429 },
430430 },
@@ -477,7 +477,7 @@ func TestDeployDecision_NeedsWait(t *testing.T) {
477477 PolicyID : "policy-1" ,
478478 PolicyName : "Test Policy" ,
479479 RuleResults : []* results.RuleEvaluationResult {
480- results .NewPendingResult ("wait" , "wait" , " waiting for slot" ),
480+ results .NewPendingResult ("wait" , "waiting for slot" ),
481481 },
482482 },
483483 },
@@ -492,7 +492,7 @@ func TestDeployDecision_NeedsWait(t *testing.T) {
492492 PolicyID : "policy-1" ,
493493 PolicyName : "Test Policy" ,
494494 RuleResults : []* results.RuleEvaluationResult {
495- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
495+ results .NewPendingResult ("approval" , "needs approval" ),
496496 },
497497 },
498498 },
@@ -507,8 +507,8 @@ func TestDeployDecision_NeedsWait(t *testing.T) {
507507 PolicyID : "policy-1" ,
508508 PolicyName : "Test Policy" ,
509509 RuleResults : []* results.RuleEvaluationResult {
510- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
511- results .NewPendingResult ("wait" , "wait" , " waiting for slot" ),
510+ results .NewPendingResult ("approval" , "needs approval" ),
511+ results .NewPendingResult ("wait" , "waiting for slot" ),
512512 },
513513 },
514514 },
@@ -561,8 +561,8 @@ func TestDeployDecision_GetApprovalActions(t *testing.T) {
561561 PolicyID : "policy-1" ,
562562 PolicyName : "Test Policy" ,
563563 RuleResults : []* results.RuleEvaluationResult {
564- results .NewPendingResult ("approval" , "approval" , "approval 1" ),
565- results .NewPendingResult ("approval" , "approval" , "approval 2" ),
564+ results .NewPendingResult ("approval" , "approval 1" ),
565+ results .NewPendingResult ("approval" , "approval 2" ),
566566 },
567567 },
568568 },
@@ -577,8 +577,8 @@ func TestDeployDecision_GetApprovalActions(t *testing.T) {
577577 PolicyID : "policy-1" ,
578578 PolicyName : "Test Policy" ,
579579 RuleResults : []* results.RuleEvaluationResult {
580- results .NewPendingResult ("wait" , "wait" , "wait 1" ),
581- results .NewPendingResult ("wait" , "wait" , "wait 2" ),
580+ results .NewPendingResult ("wait" , "wait 1" ),
581+ results .NewPendingResult ("wait" , "wait 2" ),
582582 },
583583 },
584584 },
@@ -593,9 +593,9 @@ func TestDeployDecision_GetApprovalActions(t *testing.T) {
593593 PolicyID : "policy-1" ,
594594 PolicyName : "Test Policy" ,
595595 RuleResults : []* results.RuleEvaluationResult {
596- results .NewPendingResult ("approval" , "approval" , "approval 1" ),
597- results .NewPendingResult ("wait" , "wait" , "wait 1" ),
598- results .NewPendingResult ("approval" , "approval" , "approval 2" ),
596+ results .NewPendingResult ("approval" , "approval 1" ),
597+ results .NewPendingResult ("wait" , "wait 1" ),
598+ results .NewPendingResult ("approval" , "approval 2" ),
599599 },
600600 },
601601 },
@@ -632,15 +632,15 @@ func TestDeployDecision_GetApprovalActions(t *testing.T) {
632632 PolicyID : "policy-1" ,
633633 PolicyName : "Test Policy 1" ,
634634 RuleResults : []* results.RuleEvaluationResult {
635- results .NewPendingResult ("approval" , "approval" , "approval 1" ),
635+ results .NewPendingResult ("approval" , "approval 1" ),
636636 },
637637 },
638638 {
639639 PolicyID : "policy-2" ,
640640 PolicyName : "Test Policy 2" ,
641641 RuleResults : []* results.RuleEvaluationResult {
642- results .NewPendingResult ("approval" , "approval" , "approval 2" ),
643- results .NewPendingResult ("wait" , "wait" , "wait 1" ),
642+ results .NewPendingResult ("approval" , "approval 2" ),
643+ results .NewPendingResult ("wait" , "wait 1" ),
644644 },
645645 },
646646 },
@@ -675,8 +675,8 @@ func TestDeployDecision_GetWaitActions(t *testing.T) {
675675 PolicyID : "policy-1" ,
676676 PolicyName : "Test Policy" ,
677677 RuleResults : []* results.RuleEvaluationResult {
678- results .NewPendingResult ("wait" , "wait" , "wait 1" ),
679- results .NewPendingResult ("wait" , "wait" , "wait 2" ),
678+ results .NewPendingResult ("wait" , "wait 1" ),
679+ results .NewPendingResult ("wait" , "wait 2" ),
680680 },
681681 },
682682 },
@@ -691,8 +691,8 @@ func TestDeployDecision_GetWaitActions(t *testing.T) {
691691 PolicyID : "policy-1" ,
692692 PolicyName : "Test Policy" ,
693693 RuleResults : []* results.RuleEvaluationResult {
694- results .NewPendingResult ("approval" , "approval" , "approval 1" ),
695- results .NewPendingResult ("approval" , "approval" , "approval 2" ),
694+ results .NewPendingResult ("approval" , "approval 1" ),
695+ results .NewPendingResult ("approval" , "approval 2" ),
696696 },
697697 },
698698 },
@@ -707,9 +707,9 @@ func TestDeployDecision_GetWaitActions(t *testing.T) {
707707 PolicyID : "policy-1" ,
708708 PolicyName : "Test Policy" ,
709709 RuleResults : []* results.RuleEvaluationResult {
710- results .NewPendingResult ("wait" , "wait" , "wait 1" ),
711- results .NewPendingResult ("approval" , "approval" , "approval 1" ),
712- results .NewPendingResult ("wait" , "wait" , "wait 2" ),
710+ results .NewPendingResult ("wait" , "wait 1" ),
711+ results .NewPendingResult ("approval" , "approval 1" ),
712+ results .NewPendingResult ("wait" , "wait 2" ),
713713 },
714714 },
715715 },
@@ -746,15 +746,15 @@ func TestDeployDecision_GetWaitActions(t *testing.T) {
746746 PolicyID : "policy-1" ,
747747 PolicyName : "Test Policy 1" ,
748748 RuleResults : []* results.RuleEvaluationResult {
749- results .NewPendingResult ("wait" , "wait" , "wait 1" ),
749+ results .NewPendingResult ("wait" , "wait 1" ),
750750 },
751751 },
752752 {
753753 PolicyID : "policy-2" ,
754754 PolicyName : "Test Policy 2" ,
755755 RuleResults : []* results.RuleEvaluationResult {
756- results .NewPendingResult ("wait" , "wait" , "wait 2" ),
757- results .NewPendingResult ("approval" , "approval" , "approval 1" ),
756+ results .NewPendingResult ("wait" , "wait 2" ),
757+ results .NewPendingResult ("approval" , "approval 1" ),
758758 },
759759 },
760760 },
@@ -794,15 +794,15 @@ func TestDeployDecision_ComplexScenarios(t *testing.T) {
794794 PolicyID : "policy-1" ,
795795 PolicyName : "Approval Policy" ,
796796 RuleResults : []* results.RuleEvaluationResult {
797- results .NewPendingResult ("approval" , "approval" , " needs manager approval" ),
797+ results .NewPendingResult ("approval" , "needs manager approval" ),
798798 results .NewAllowedResult ("passed rule" ),
799799 },
800800 },
801801 {
802802 PolicyID : "policy-2" ,
803803 PolicyName : "Concurrency Policy" ,
804804 RuleResults : []* results.RuleEvaluationResult {
805- results .NewPendingResult ("wait" , "wait" , " waiting for concurrency slot" ),
805+ results .NewPendingResult ("wait" , "waiting for concurrency slot" ),
806806 },
807807 },
808808 {
@@ -841,7 +841,7 @@ func TestDeployDecision_ComplexScenarios(t *testing.T) {
841841 PolicyName : "Security Policy" ,
842842 RuleResults : []* results.RuleEvaluationResult {
843843 results .NewDeniedResult ("security check failed" ),
844- results .NewPendingResult ("approval" , "approval" , " needs approval" ),
844+ results .NewPendingResult ("approval" , "needs approval" ),
845845 },
846846 },
847847 },
0 commit comments