mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Remove unused exported errors
This commit is contained in:
parent
37e8c17041
commit
a536ebc580
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user