| 1 |
package rfc |
| 2 |
|
| 3 |
import ( |
| 4 |
"testing" |
| 5 |
|
| 6 |
"github.com/zmap/zlint/v3/lint" |
| 7 |
"github.com/zmap/zlint/v3/test" |
| 8 |
) |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
func TestCrlHasNextUpdate(t *testing.T) { |
| 25 |
inputPath := "crlHasNextUpdate.pem" |
| 26 |
want := lint.Pass |
| 27 |
got := test.TestRevocationListLint(t, "e_crl_has_next_update", inputPath).Status |
| 28 |
|
| 29 |
if want != got { |
| 30 |
t.Errorf("%s: expected %s, got %s", inputPath, want, got) |
| 31 |
} |
| 32 |
} |
| 33 |
|
| 34 |
func TestCrlNotHaveNextUpdate(t *testing.T) { |
| 35 |
inputPath := "crlNotHaveNextUpdate.pem" |
| 36 |
want := lint.Error |
| 37 |
got := test.TestRevocationListLint(t, "e_crl_has_next_update", inputPath).Status |
| 38 |
|
| 39 |
if want != got { |
| 40 |
t.Errorf("%s: expected %s, got %s", inputPath, want, got) |
| 41 |
} |
| 42 |
} |