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
b7120f27
Commit
b7120f27
authored
Jan 07, 2015
by
Tim Hockin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3265 from rjnagal/cleanup
Fix few vet errors.
parents
051db1de
62ecd5f3
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
11 additions
and
12 deletions
+11
-12
e2e.go
hack/e2e.go
+1
-1
provided_flags.go
pkg/client/clientcmd/provided_flags.go
+1
-1
request_test.go
pkg/client/request_test.go
+1
-1
minioncontroller.go
pkg/cloudprovider/controller/minioncontroller.go
+0
-1
openstack_test.go
pkg/cloudprovider/openstack/openstack_test.go
+2
-2
standalone.go
pkg/standalone/standalone.go
+1
-1
util.go
pkg/util/util.go
+2
-2
x509_test.go
plugin/pkg/auth/authenticator/request/x509/x509_test.go
+2
-2
plugins_test.go
plugin/pkg/scheduler/algorithmprovider/plugins_test.go
+1
-1
No files found.
hack/e2e.go
View file @
b7120f27
...
...
@@ -286,7 +286,7 @@ func Test() (results ResultsByTest) {
continue
}
if
err
!=
nil
{
log
.
Fatal
(
"Bad test pattern: %v"
,
tests
)
log
.
Fatal
f
(
"Bad test pattern: %v"
,
*
tests
)
}
toRun
=
append
(
toRun
,
name
)
}
...
...
pkg/client/clientcmd/provided_flags.go
View file @
b7120f27
...
...
@@ -96,5 +96,5 @@ func (flag *BoolFlag) Provided() bool {
}
func
(
flag
*
BoolFlag
)
String
()
string
{
return
fmt
.
Sprintf
(
"%
s
"
,
flag
.
Value
)
return
fmt
.
Sprintf
(
"%
t
"
,
flag
.
Value
)
}
pkg/client/request_test.go
View file @
b7120f27
...
...
@@ -393,7 +393,7 @@ func TestRequestWatch(t *testing.T) {
if
testCase
.
Empty
{
_
,
ok
:=
<-
watch
.
ResultChan
()
if
ok
{
t
.
Errorf
(
"%d: expected the watch to be empty: %#v"
,
watch
)
t
.
Errorf
(
"%d: expected the watch to be empty: %#v"
,
i
,
watch
)
}
}
}
...
...
pkg/cloudprovider/controller/minioncontroller.go
View file @
b7120f27
...
...
@@ -88,7 +88,6 @@ func (s *MinionController) SyncStatic(period time.Duration) error {
}
time
.
Sleep
(
period
)
}
return
nil
}
// SyncCloud syncs list of instances from cloudprovider to master etcd registry.
...
...
pkg/cloudprovider/openstack/openstack_test.go
View file @
b7120f27
...
...
@@ -49,7 +49,7 @@ monitor-max-retries = 3
}
if
!
cfg
.
LoadBalancer
.
CreateMonitor
{
t
.
Errorf
(
"incorrect lb.createmonitor: %
s
"
,
cfg
.
LoadBalancer
.
CreateMonitor
)
t
.
Errorf
(
"incorrect lb.createmonitor: %
t
"
,
cfg
.
LoadBalancer
.
CreateMonitor
)
}
if
cfg
.
LoadBalancer
.
MonitorDelay
.
Duration
!=
1
*
time
.
Minute
{
t
.
Errorf
(
"incorrect lb.monitordelay: %s"
,
cfg
.
LoadBalancer
.
MonitorDelay
)
...
...
@@ -58,7 +58,7 @@ monitor-max-retries = 3
t
.
Errorf
(
"incorrect lb.monitortimeout: %s"
,
cfg
.
LoadBalancer
.
MonitorTimeout
)
}
if
cfg
.
LoadBalancer
.
MonitorMaxRetries
!=
3
{
t
.
Errorf
(
"incorrect lb.monitormaxretries: %
s
"
,
cfg
.
LoadBalancer
.
MonitorMaxRetries
)
t
.
Errorf
(
"incorrect lb.monitormaxretries: %
d
"
,
cfg
.
LoadBalancer
.
MonitorMaxRetries
)
}
}
...
...
pkg/standalone/standalone.go
View file @
b7120f27
...
...
@@ -92,7 +92,7 @@ func RunScheduler(cl *client.Client) {
schedulerConfigFactory
:=
factory
.
NewConfigFactory
(
cl
)
schedulerConfig
,
err
:=
schedulerConfigFactory
.
Create
()
if
err
!=
nil
{
glog
.
Fatal
(
"Couldn't create scheduler config: %v"
,
err
)
glog
.
Fatal
f
(
"Couldn't create scheduler config: %v"
,
err
)
}
scheduler
.
New
(
schedulerConfig
)
.
Run
()
}
...
...
pkg/util/util.go
View file @
b7120f27
...
...
@@ -141,11 +141,11 @@ func CompileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) {
// Writes 'value' to /proc/self/oom_score_adj.
func
ApplyOomScoreAdj
(
value
int
)
error
{
if
value
<
-
1000
||
value
>
1000
{
return
fmt
.
Errorf
(
"invalid value(%d) specified for oom_score_adj. Values must be within the range [-1000, 1000]"
)
return
fmt
.
Errorf
(
"invalid value(%d) specified for oom_score_adj. Values must be within the range [-1000, 1000]"
,
value
)
}
if
err
:=
ioutil
.
WriteFile
(
"/proc/self/oom_score_adj"
,
[]
byte
(
strconv
.
Itoa
(
value
)),
0700
);
err
!=
nil
{
fmt
.
Errorf
(
"failed to set oom_score_adj to %
s
- %q"
,
value
,
err
)
fmt
.
Errorf
(
"failed to set oom_score_adj to %
d
- %q"
,
value
,
err
)
}
return
nil
...
...
plugin/pkg/auth/authenticator/request/x509/x509_test.go
View file @
b7120f27
...
...
@@ -531,13 +531,13 @@ func TestX509(t *testing.T) {
}
if
testCase
.
ExpectOK
!=
ok
{
t
.
Errorf
(
"%s: Expected ok=%v, got %v"
,
testCase
.
ExpectOK
,
ok
)
t
.
Errorf
(
"%s: Expected ok=%v, got %v"
,
k
,
testCase
.
ExpectOK
,
ok
)
continue
}
if
testCase
.
ExpectOK
{
if
testCase
.
ExpectUserName
!=
user
.
GetName
()
{
t
.
Errorf
(
"%s: Expected user.name=%v, got %v"
,
testCase
.
ExpectUserName
,
user
.
GetName
())
t
.
Errorf
(
"%s: Expected user.name=%v, got %v"
,
k
,
testCase
.
ExpectUserName
,
user
.
GetName
())
continue
}
}
...
...
plugin/pkg/scheduler/algorithmprovider/plugins_test.go
View file @
b7120f27
...
...
@@ -49,7 +49,7 @@ func TestAlgorithmProviders(t *testing.T) {
break
}
if
len
(
p
.
PriorityFunctionKeys
)
==
0
{
t
.
Error
(
"%s algorithm provider shouldn't have 0 priority functions"
,
pn
)
t
.
Error
f
(
"%s algorithm provider shouldn't have 0 priority functions"
,
pn
)
}
for
_
,
pf
:=
range
p
.
PriorityFunctionKeys
.
List
()
{
if
!
factory
.
IsPriorityFunctionRegistered
(
pf
)
{
...
...
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