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
f95bc928
Commit
f95bc928
authored
Feb 04, 2018
by
Cao Shufeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix assert.Equal argument order
Reference:
https://godoc.org/github.com/stretchr/testify/assert#Equal
parent
d5ee83bd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
helpers_test.go
pkg/kubelet/dockershim/helpers_test.go
+1
-1
admission_test.go
...kg/admission/security/podsecuritypolicy/admission_test.go
+1
-1
ring_growing_test.go
...ing/src/k8s.io/client-go/util/buffer/ring_growing_test.go
+1
-1
No files found.
pkg/kubelet/dockershim/helpers_test.go
View file @
f95bc928
...
@@ -342,5 +342,5 @@ func TestGenerateMountBindings(t *testing.T) {
...
@@ -342,5 +342,5 @@ func TestGenerateMountBindings(t *testing.T) {
}
}
result
:=
generateMountBindings
(
mounts
)
result
:=
generateMountBindings
(
mounts
)
assert
.
Equal
(
t
,
result
,
expectedR
esult
)
assert
.
Equal
(
t
,
expectedResult
,
r
esult
)
}
}
plugin/pkg/admission/security/podsecuritypolicy/admission_test.go
View file @
f95bc928
...
@@ -2309,7 +2309,7 @@ func TestPreferValidatedPSP(t *testing.T) {
...
@@ -2309,7 +2309,7 @@ func TestPreferValidatedPSP(t *testing.T) {
_
,
pspName
,
validationErrs
,
err
:=
plugin
.
computeSecurityContext
(
attrs
,
pod
,
false
,
tc
.
validatedPSPHint
)
_
,
pspName
,
validationErrs
,
err
:=
plugin
.
computeSecurityContext
(
attrs
,
pod
,
false
,
tc
.
validatedPSPHint
)
assert
.
NoError
(
t
,
err
)
assert
.
NoError
(
t
,
err
)
assert
.
Len
(
t
,
validationErrs
,
tc
.
expectValidationErrs
)
assert
.
Len
(
t
,
validationErrs
,
tc
.
expectValidationErrs
)
assert
.
Equal
(
t
,
pspName
,
tc
.
expectedPSP
)
assert
.
Equal
(
t
,
tc
.
expectedPSP
,
pspName
)
})
})
}
}
}
}
...
...
staging/src/k8s.io/client-go/util/buffer/ring_growing_test.go
View file @
f95bc928
...
@@ -39,7 +39,7 @@ func TestGrowth(t *testing.T) {
...
@@ -39,7 +39,7 @@ func TestGrowth(t *testing.T) {
}
}
assert
.
Equalf
(
t
,
x
,
read
,
"expected to have read %d items: %d"
,
x
,
read
)
assert
.
Equalf
(
t
,
x
,
read
,
"expected to have read %d items: %d"
,
x
,
read
)
assert
.
Zerof
(
t
,
g
.
readable
,
"expected readable to be zero: %d"
,
g
.
readable
)
assert
.
Zerof
(
t
,
g
.
readable
,
"expected readable to be zero: %d"
,
g
.
readable
)
assert
.
Equalf
(
t
,
g
.
n
,
16
,
"expected N to be 16: %d"
,
g
.
n
)
assert
.
Equalf
(
t
,
16
,
g
.
n
,
"expected N to be 16: %d"
,
g
.
n
)
}
}
func
TestEmpty
(
t
*
testing
.
T
)
{
func
TestEmpty
(
t
*
testing
.
T
)
{
...
...
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