Add godocs for fixtures
... and rename `InvalidCaCertPath` to `InvalidCertPath`.
This commit is contained in:
parent
0cbe25436d
commit
795e4c4254
@ -103,7 +103,7 @@ func TestInvalidCaCert(t *testing.T) {
|
|||||||
connection := &vclib.VSphereConnection{
|
connection := &vclib.VSphereConnection{
|
||||||
Hostname: "should-not-matter",
|
Hostname: "should-not-matter",
|
||||||
Port: "should-not-matter",
|
Port: "should-not-matter",
|
||||||
CACert: fixtures.InvalidCaCertPath,
|
CACert: fixtures.InvalidCertPath,
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err := connection.NewClient(context.Background())
|
_, err := connection.NewClient(context.Background())
|
||||||
|
@ -24,10 +24,17 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
CaCertPath string
|
// CaCertPath is the filepath to a certificate that can be used as a CA
|
||||||
ServerCertPath string
|
// certificate.
|
||||||
ServerKeyPath string
|
CaCertPath string
|
||||||
InvalidCaCertPath string
|
// ServerCertPath is the filepath to a leaf certifiacte signed by the CA at
|
||||||
|
// `CaCertPath`.
|
||||||
|
ServerCertPath string
|
||||||
|
// ServerKeyPath is the filepath to the private key for the ceritifiacte at
|
||||||
|
// `ServerCertPath`.
|
||||||
|
ServerKeyPath string
|
||||||
|
// InvalidCertPath is the filepath to an invalid certificate.
|
||||||
|
InvalidCertPath string
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -54,5 +61,5 @@ func init() {
|
|||||||
CaCertPath = filepath.Join(fixturesDir, "ca.pem")
|
CaCertPath = filepath.Join(fixturesDir, "ca.pem")
|
||||||
ServerCertPath = filepath.Join(fixturesDir, "server.pem")
|
ServerCertPath = filepath.Join(fixturesDir, "server.pem")
|
||||||
ServerKeyPath = filepath.Join(fixturesDir, "server.key")
|
ServerKeyPath = filepath.Join(fixturesDir, "server.key")
|
||||||
InvalidCaCertPath = filepath.Join(fixturesDir, "invalid.pem")
|
InvalidCertPath = filepath.Join(fixturesDir, "invalid.pem")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user