MCPcopy
hub / github.com/cloudflare/cloudflared / TestJSONArgoTunnelTokenEmpty

Function TestJSONArgoTunnelTokenEmpty

credentials/origin_cert_test.go:33–39  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

31}
32
33func TestJSONArgoTunnelTokenEmpty(t *testing.T) {
34 blocks, err := os.ReadFile("test-cert-no-token.pem")
35 require.NoError(t, err)
36 cert, err := decodeOriginCert(blocks)
37 assert.Equal(t, fmt.Errorf("missing token in the certificate"), err)
38 assert.Nil(t, cert)
39}
40
41func TestJSONArgoTunnelToken(t *testing.T) {
42 // The given cert's Argo Tunnel Token was generated by base64 encoding this JSON:

Callers

nothing calls this directly

Calls 3

decodeOriginCertFunction · 0.85
ErrorfMethod · 0.80
EqualMethod · 0.65

Tested by

no test coverage detected