| 1 |
package rfc |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
import ( |
| 18 |
"testing" |
| 19 |
|
| 20 |
"github.com/zmap/zlint/v3/lint" |
| 21 |
"github.com/zmap/zlint/v3/test" |
| 22 |
) |
| 23 |
|
| 24 |
func TestPolicyMapFromAnyPolicy(t *testing.T) { |
| 25 |
inputPath := "policyMapFromAnyPolicy.pem" |
| 26 |
expected := lint.Error |
| 27 |
out := test.TestLint("e_ext_policy_map_any_policy", inputPath) |
| 28 |
if out.Status != expected { |
| 29 |
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status) |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
func TestPolicyMapToAnyPolicy(t *testing.T) { |
| 34 |
inputPath := "policyMapToAnyPolicy.pem" |
| 35 |
expected := lint.Error |
| 36 |
out := test.TestLint("e_ext_policy_map_any_policy", inputPath) |
| 37 |
if out.Status != expected { |
| 38 |
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status) |
| 39 |
} |
| 40 |
} |
| 41 |
|
| 42 |
func TestPolicyMapToNoAnyPolicy(t *testing.T) { |
| 43 |
inputPath := "policyMapGood.pem" |
| 44 |
expected := lint.Pass |
| 45 |
out := test.TestLint("e_ext_policy_map_any_policy", inputPath) |
| 46 |
if out.Status != expected { |
| 47 |
t.Errorf("%s: expected %s, got %s", inputPath, expected, out.Status) |
| 48 |
} |
| 49 |
} |