Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for errorIfMessagesExceedThreshold (0.13 sec)

  1. istioctl/pkg/analyze/analyze_test.go

    			diag.NewMessageType(diag.Error, "B1", "Template: %q"),
    			nil,
    			"",
    		),
    		diag.NewMessage(
    			diag.NewMessageType(diag.Warning, "A1", "Template: %q"),
    			nil,
    			"",
    		),
    	}
    
    	err := errorIfMessagesExceedThreshold(msgs)
    
    	g.Expect(err).To(BeIdenticalTo(AnalyzerFoundIssuesError{}))
    }
    
    func TestNoErrorIfMessageLevelsBelowThreshold(t *testing.T) {
    	g := NewWithT(t)
    
    	msgs := []diag.Message{
    		diag.NewMessage(
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  2. istioctl/pkg/analyze/analyze.go

    			// We're intentionally keeping failure threshold and output threshold decoupled for now
    			var returnError error
    			if msgOutputFormat == formatting.LogFormat {
    				returnError = errorIfMessagesExceedThreshold(result.Messages)
    				if returnError == nil && parseErrors > 0 && !ignoreUnknown {
    					returnError = FileParseError{}
    				}
    			}
    			return returnError
    		},
    	}
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Thu Oct 31 06:53:50 UTC 2024
    - 17.6K bytes
    - Viewed (0)
Back to top