mirror of
https://github.com/tailscale/tailscale.git
synced 2025-06-10 01:38:35 +00:00
prober: fix test logic (#15952)
Catch failing tests that have no expected error string. Updates #15912 Signed-off-by: Mike O'Driscoll <mikeo@tailscale.com>
This commit is contained in:
parent
65e005ccaa
commit
fccba5a2f1
@ -252,7 +252,7 @@ func TestCRL(t *testing.T) {
|
||||
"NoCRL",
|
||||
leafCertParsed,
|
||||
nil,
|
||||
"",
|
||||
"no CRL server presented in leaf cert for",
|
||||
},
|
||||
{
|
||||
"NotBeforeCRLStaplingDate",
|
||||
@ -276,7 +276,7 @@ func TestCRL(t *testing.T) {
|
||||
return
|
||||
}
|
||||
|
||||
if err == nil || !strings.Contains(err.Error(), tt.wantErr) {
|
||||
if err == nil || tt.wantErr == "" || !strings.Contains(err.Error(), tt.wantErr) {
|
||||
t.Errorf("unexpected error %q; want %q", err, tt.wantErr)
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user