Debian Codegraph @

v3/lints/rfc/lint_crl_has_next_update_test.go

raw symbols SCIP
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 * ZLint Copyright 2024 Regents of the University of Michigan
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
14 * use this file except in compliance with the License. You may obtain a copy
15 * of the License at http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing, software
18 * distributed under the License is distributed on an "AS IS" BASIS,
19 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
20 * implied. See the License for the specific language governing
21 * permissions and limitations under the License.
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 }