MCPcopy Create free account
hub / github.com/conforma/cli / Test_PrintExpectedJSON

Function Test_PrintExpectedJSON

internal/output/output_test.go:40–177  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

38)
39
40func Test_PrintExpectedJSON(t *testing.T) {
41 output := Output{
42 ImageSignatureCheck: VerificationStatus{
43 Passed: true,
44 Result: &evaluator.Result{Message: "message1"},
45 },
46 ImageAccessibleCheck: VerificationStatus{
47 Passed: true,
48 Result: &evaluator.Result{Message: "message2"},
49 },
50 AttestationSignatureCheck: VerificationStatus{
51 Passed: false,
52 Result: &evaluator.Result{Message: "message3"},
53 },
54 AttestationSyntaxCheck: VerificationStatus{
55 Passed: false,
56 Result: &evaluator.Result{Message: "message4"},
57 },
58 PolicyCheck: []evaluator.Outcome{
59 {
60 FileName: "file1.json",
61 Namespace: "namespace1",
62 Skipped: []evaluator.Result{
63 {Message: "result11"},
64 {Message: "result12"},
65 },
66 Warnings: []evaluator.Result{
67 {Message: "result13"},
68 {Message: "result14"},
69 },
70 Failures: []evaluator.Result{
71 {Message: "result15"},
72 },
73 Exceptions: []evaluator.Result{},
74 Successes: []evaluator.Result{
75 {Message: "result16"},
76 {Message: "result17"},
77 },
78 },
79 {
80 FileName: "file2.json",
81 Namespace: "namespace2",
82 Skipped: []evaluator.Result{
83 {
84 Message: "result21",
85 },
86 },
87 Successes: []evaluator.Result{
88 {Message: "result22"},
89 },
90 },
91 },
92 Signatures: []signature.EntitySignature{
93 {KeyID: "key-id", Signature: "signature"},
94 },
95 ExitCode: 42,
96 }
97

Callers

nothing calls this directly

Calls 2

PrintMethod · 0.95
StringMethod · 0.45

Tested by

no test coverage detected