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
fc8fa698
Commit
fc8fa698
authored
Apr 27, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24582 from xiangpengzhao/master
Automatic merge from submit-queue Improve error messages in jwt_test.go
parents
8dfb6ebc
c381a7b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
jwt_test.go
pkg/serviceaccount/jwt_test.go
+4
-4
No files found.
pkg/serviceaccount/jwt_test.go
View file @
fc8fa698
...
@@ -100,11 +100,11 @@ func TestReadPrivateKey(t *testing.T) {
...
@@ -100,11 +100,11 @@ func TestReadPrivateKey(t *testing.T) {
defer
os
.
Remove
(
f
.
Name
())
defer
os
.
Remove
(
f
.
Name
())
if
err
:=
ioutil
.
WriteFile
(
f
.
Name
(),
[]
byte
(
privateKey
),
os
.
FileMode
(
0600
));
err
!=
nil
{
if
err
:=
ioutil
.
WriteFile
(
f
.
Name
(),
[]
byte
(
privateKey
),
os
.
FileMode
(
0600
));
err
!=
nil
{
t
.
Fatalf
(
"error
creating
tmpfile: %v"
,
err
)
t
.
Fatalf
(
"error
writing private key to
tmpfile: %v"
,
err
)
}
}
if
_
,
err
:=
serviceaccount
.
ReadPrivateKey
(
f
.
Name
());
err
!=
nil
{
if
_
,
err
:=
serviceaccount
.
ReadPrivateKey
(
f
.
Name
());
err
!=
nil
{
t
.
Fatalf
(
"error reading key: %v"
,
err
)
t
.
Fatalf
(
"error reading
private
key: %v"
,
err
)
}
}
}
}
...
@@ -116,11 +116,11 @@ func TestReadPublicKey(t *testing.T) {
...
@@ -116,11 +116,11 @@ func TestReadPublicKey(t *testing.T) {
defer
os
.
Remove
(
f
.
Name
())
defer
os
.
Remove
(
f
.
Name
())
if
err
:=
ioutil
.
WriteFile
(
f
.
Name
(),
[]
byte
(
publicKey
),
os
.
FileMode
(
0600
));
err
!=
nil
{
if
err
:=
ioutil
.
WriteFile
(
f
.
Name
(),
[]
byte
(
publicKey
),
os
.
FileMode
(
0600
));
err
!=
nil
{
t
.
Fatalf
(
"error
creating
tmpfile: %v"
,
err
)
t
.
Fatalf
(
"error
writing public key to
tmpfile: %v"
,
err
)
}
}
if
_
,
err
:=
serviceaccount
.
ReadPublicKey
(
f
.
Name
());
err
!=
nil
{
if
_
,
err
:=
serviceaccount
.
ReadPublicKey
(
f
.
Name
());
err
!=
nil
{
t
.
Fatalf
(
"error reading key: %v"
,
err
)
t
.
Fatalf
(
"error reading
public
key: %v"
,
err
)
}
}
}
}
...
...
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