Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a536ebc5
Commit
a536ebc5
authored
Jun 24, 2018
by
Hannes Hörl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused exported errors
parent
37e8c170
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
connection.go
pkg/cloudprovider/providers/vsphere/vclib/connection.go
+0
-6
connection_test.go
pkg/cloudprovider/providers/vsphere/vclib/connection_test.go
+2
-2
No files found.
pkg/cloudprovider/providers/vsphere/vclib/connection.go
View file @
a536ebc5
...
...
@@ -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
))
...
...
pkg/cloudprovider/providers/vsphere/vclib/connection_test.go
View file @
a536ebc5
...
...
@@ -180,8 +180,8 @@ func TestInvalidCaCert(t *testing.T) {
_
,
err
:=
connection
.
NewClient
(
context
.
Background
())
if
err
!=
vclib
.
ErrCaCertInvalid
{
t
.
Fatalf
(
"E
rrCaCertInvalid should have occurred, instead got: %v"
,
err
)
if
msg
:=
err
.
Error
();
!
strings
.
Contains
(
msg
,
"invalid certificate"
)
{
t
.
Fatalf
(
"E
xpected invalid certificate error, got '%s'"
,
msg
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment