Skip to content

Commit 5aa5043

Browse files
author
Paulo Gomes
committed
tests: fix error message for invalid x509 in darwin
Signed-off-by: Paulo Gomes <paulo.gomes@weave.works>
1 parent 2adde58 commit 5aa5043

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

controllers/gitrepository_controller_test.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,12 @@ func TestGitRepositoryReconciler_reconcileSource_authStrategy(t *testing.T) {
337337
},
338338
wantErr: true,
339339
assertConditions: []metav1.Condition{
340-
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.GitOperationFailedReason, "x509: certificate signed by unknown authority"),
340+
// The expected error messages may differ when in darwin. In some cases it will match the
341+
// error message expected in linux: "x509: certificate signed by unknown authority". In
342+
// other cases it may get "x509: “example.com” certificate is not standards compliant" instead.
343+
//
344+
// Trimming the expected error message for consistent results.
345+
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.GitOperationFailedReason, "x509: "),
341346
},
342347
},
343348
{

0 commit comments

Comments
 (0)