MCPcopy
hub / github.com/smallstep/cli / TestCertificateFingerprintCommand

Function TestCertificateFingerprintCommand

integration/certificate_test.go:109–122  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

107}
108
109func TestCertificateFingerprintCommand(t *testing.T) {
110 b, err := os.ReadFile("./testdata/intermediate_ca.crt")
111 require.NoError(t, err)
112
113 testscript.Run(t, testscript.Params{
114 Files: []string{"testdata/certificate/fingerprint.txtar"},
115 Setup: func(e *testscript.Env) error {
116 err := os.WriteFile(filepath.Join(e.Cd, "intermediate_ca.crt"), b, 0600)
117 require.NoError(t, err)
118
119 return nil
120 },
121 })
122}
123
124func checkCertificate(ts *testscript.TestScript, neg bool, args []string) {
125 contents := ts.ReadFile("stdout") // directly reads from stdout of the previously executed command

Callers

nothing calls this directly

Calls 1

RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…