Commit a536ebc5 authored by Hannes Hörl's avatar Hannes Hörl

Remove unused exported errors

parent 37e8c170
......@@ -20,7 +20,6 @@ import (
"context"
"crypto/tls"
"encoding/pem"
"errors"
"net"
neturl "net/url"
"sync"
......@@ -148,11 +147,6 @@ func (connection *VSphereConnection) Logout(ctx context.Context) {
}
}
var (
ErrCaCertNotReadable = errors.New("Could not read CA cert file")
ErrCaCertInvalid = errors.New("Could not parse CA cert file")
)
// NewClient creates a new govmomi client for the VSphereConnection obj
func (connection *VSphereConnection) NewClient(ctx context.Context) (*vim25.Client, error) {
url, err := soap.ParseURL(net.JoinHostPort(connection.Hostname, connection.Port))
......
......@@ -180,8 +180,8 @@ func TestInvalidCaCert(t *testing.T) {
_, err := connection.NewClient(context.Background())
if err != vclib.ErrCaCertInvalid {
t.Fatalf("ErrCaCertInvalid should have occurred, instead got: %v", err)
if msg := err.Error(); !strings.Contains(msg, "invalid certificate") {
t.Fatalf("Expected invalid certificate error, got '%s'", msg)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment