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
c0c1e148
Unverified
Commit
c0c1e148
authored
Apr 20, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Apr 20, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #76859 from SataQiu/fix-kubeadm-20190420
kubeadm: use 'errors.Errorf' instead of 'fmt.Errorf'
parents
c262f9c7
62dbd0fa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
BUILD
cmd/kubeadm/app/discovery/token/BUILD
+4
-1
token_test.go
cmd/kubeadm/app/discovery/token/token_test.go
+3
-2
No files found.
cmd/kubeadm/app/discovery/token/BUILD
View file @
c0c1e148
...
...
@@ -45,5 +45,8 @@ go_test(
name = "go_default_test",
srcs = ["token_test.go"],
embed = [":go_default_library"],
deps = ["//staging/src/k8s.io/client-go/tools/clientcmd/api:go_default_library"],
deps = [
"//staging/src/k8s.io/client-go/tools/clientcmd/api:go_default_library",
"//vendor/github.com/pkg/errors:go_default_library",
],
)
cmd/kubeadm/app/discovery/token/token_test.go
View file @
c0c1e148
...
...
@@ -17,10 +17,11 @@ limitations under the License.
package
token
import
(
"fmt"
"testing"
"time"
"github.com/pkg/errors"
clientcmdapi
"k8s.io/client-go/tools/clientcmd/api"
)
...
...
@@ -71,7 +72,7 @@ func TestFetchKubeConfigWithTimeout(t *testing.T) {
t
.
Run
(
test
.
name
,
func
(
t
*
testing
.
T
)
{
cfg
,
err
:=
fetchKubeConfigWithTimeout
(
testAPIEndpoint
,
test
.
discoveryTimeout
,
func
(
apiEndpoint
string
)
(
*
clientcmdapi
.
Config
,
error
)
{
if
apiEndpoint
!=
testAPIEndpoint
{
return
nil
,
fmt
.
Errorf
(
"unexpected API server endpoint:
\n\t
expected: %q
\n\t
got: %q"
,
testAPIEndpoint
,
apiEndpoint
)
return
nil
,
errors
.
Errorf
(
"unexpected API server endpoint:
\n\t
expected: %q
\n\t
got: %q"
,
testAPIEndpoint
,
apiEndpoint
)
}
time
.
Sleep
(
3
*
time
.
Second
)
...
...
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