1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: Apache-2.0
11 check "gopkg.in/check.v1"
14 type tlsCertsSuite struct{}
16 var _ = check.Suite(&tlsCertsSuite{})
18 func (s *tlsCertsSuite) TestCustomCert(c *check.C) {
19 certfile := "/etc/arvados/ca-certificates.crt"
20 if _, err := os.Stat(certfile); err != nil {
21 c.Skip("custom cert file " + certfile + " does not exist")
23 out, err := exec.Command("bash", "-c", "SSL_CERT_FILE= go run tls_certs_test_showenv.go").CombinedOutput()
25 c.Assert(err, check.IsNil)
26 c.Check(string(out), check.Equals, certfile+"\n")
28 out, err = exec.Command("bash", "-c", "SSL_CERT_FILE=/dev/null go run tls_certs_test_showenv.go").CombinedOutput()
30 c.Assert(err, check.IsNil)
31 c.Check(string(out), check.Equals, "/dev/null\n")