Remove references to test-ca.pem. (#3322)

shell_test.go and publisher_test.go had unnecessary references to
../test/test-ca.pem. This change makes them a little more self-contained.

Note: ca/ca_test.go still depends on test-ca.pem, but removing the dependency
turns out to be a little more complicated due to hardcoded expectations in some
of the test cases.
This commit is contained in:
Jacob Hoffman-Andrews 2018-01-05 12:07:12 -08:00 committed by Roland Bracewell Shoemaker
parent 4ba5205e81
commit a98a206dd2
2 changed files with 3 additions and 5 deletions

View File

@ -145,7 +145,7 @@ func TestLoadCert(t *testing.T) {
"open ../does/not/exist: no such file or directory", "open ../does/not/exist: no such file or directory",
}, },
{ {
"../test/test-ca.key", "./testdata/key.pem",
"Invalid certificate value returned", "Invalid certificate value returned",
}, },
} }
@ -156,8 +156,8 @@ func TestLoadCert(t *testing.T) {
test.AssertEquals(t, err.Error(), tc.expectedErr) test.AssertEquals(t, err.Error(), tc.expectedErr)
} }
bytes, err := LoadCert("../test/test-ca.pem") bytes, err := LoadCert("./testdata/cert.pem")
test.AssertNotError(t, err, "LoadCert(../test/test-ca.pem) errored") test.AssertNotError(t, err, "LoadCert(\"./testdata/cert.pem\") errored")
test.AssertNotEquals(t, len(bytes), 0) test.AssertNotEquals(t, len(bytes), 0)
} }

View File

@ -115,8 +115,6 @@ CspkK71IGqM9UwwMtCZBp0fK/Xv9o1d85paXcJ/aH8zg6EK4UkuXDFnLsg1LrIru
OY8B7wwvZTLzU6WWs781TJXx2CE04PneeeArLpVLkiGIWjk= OY8B7wwvZTLzU6WWs781TJXx2CE04PneeeArLpVLkiGIWjk=
-----END CERTIFICATE-----` -----END CERTIFICATE-----`
const issuerPath = "../test/test-ca.pem"
var log = blog.UseMock() var log = blog.UseMock()
var ctx = context.Background() var ctx = context.Background()