MCPcopy Create free account
hub / github.com/cloudbase/garm / TestCACertBundleInvalidPath

Function TestCACertBundleInvalidPath

config/config_test.go:866–878  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

864}
865
866func TestCACertBundleInvalidPath(t *testing.T) {
867 cfg := Github{
868 Name: "dummy_creds",
869 Description: "dummy github credentials",
870 OAuth2Token: "bogus",
871 CACertBundlePath: "/i/dont/exist",
872 }
873
874 cert, err := cfg.CACertBundle()
875 require.NotNil(t, err)
876 require.EqualError(t, err, "error accessing ca_cert_bundle: stat /i/dont/exist: no such file or directory")
877 require.Nil(t, cert)
878}
879
880func TestCACertBundleInvalidFile(t *testing.T) {
881 cfg := Github{

Callers

nothing calls this directly

Calls 1

CACertBundleMethod · 0.95

Tested by

no test coverage detected