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
db75904b
Unverified
Commit
db75904b
authored
Dec 14, 2016
by
Jess Frazelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix when os.Remove should be os.RemoveAll
Signed-off-by:
Jess Frazelle
<
acidburn@google.com
>
parent
7db9c8b4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
6 deletions
+8
-6
manifests_test.go
cmd/kubeadm/app/master/manifests_test.go
+1
-1
pki_helpers_test.go
cmd/kubeadm/app/phases/certs/pki_helpers_test.go
+1
-1
kubeconfig_test.go
cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go
+1
-1
loader_test.go
pkg/client/unversioned/clientcmd/loader_test.go
+4
-3
container_manager_linux_test.go
pkg/kubelet/cm/container_manager_linux_test.go
+1
-0
No files found.
cmd/kubeadm/app/master/manifests_test.go
View file @
db75904b
...
@@ -33,7 +33,7 @@ func TestWriteStaticPodManifests(t *testing.T) {
...
@@ -33,7 +33,7 @@ func TestWriteStaticPodManifests(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"Couldn't create tmpdir"
)
t
.
Fatalf
(
"Couldn't create tmpdir"
)
}
}
defer
os
.
Remove
(
tmpdir
)
defer
os
.
Remove
All
(
tmpdir
)
// set up tmp GlobalEnvParams values for testing
// set up tmp GlobalEnvParams values for testing
oldEnv
:=
kubeadmapi
.
GlobalEnvParams
oldEnv
:=
kubeadmapi
.
GlobalEnvParams
...
...
cmd/kubeadm/app/phases/certs/pki_helpers_test.go
View file @
db75904b
...
@@ -121,7 +121,7 @@ func TestWriteKeysAndCert(t *testing.T) {
...
@@ -121,7 +121,7 @@ func TestWriteKeysAndCert(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"Couldn't create tmpdir"
)
t
.
Fatalf
(
"Couldn't create tmpdir"
)
}
}
defer
os
.
Remove
(
tmpdir
)
defer
os
.
Remove
All
(
tmpdir
)
caKey
,
err
:=
rsa
.
GenerateKey
(
rand
.
Reader
,
2048
)
caKey
,
err
:=
rsa
.
GenerateKey
(
rand
.
Reader
,
2048
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
cmd/kubeadm/app/phases/kubeconfig/kubeconfig_test.go
View file @
db75904b
...
@@ -142,7 +142,7 @@ func TestWriteKubeconfigToDisk(t *testing.T) {
...
@@ -142,7 +142,7 @@ func TestWriteKubeconfigToDisk(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"Couldn't create tmpdir"
)
t
.
Fatalf
(
"Couldn't create tmpdir"
)
}
}
defer
os
.
Remove
(
tmpdir
)
defer
os
.
Remove
All
(
tmpdir
)
// set up tmp GlobalEnvParams values for testing
// set up tmp GlobalEnvParams values for testing
oldEnv
:=
kubeadmapi
.
GlobalEnvParams
oldEnv
:=
kubeadmapi
.
GlobalEnvParams
...
...
pkg/client/unversioned/clientcmd/loader_test.go
View file @
db75904b
...
@@ -129,7 +129,7 @@ func TestErrorReadingNonFile(t *testing.T) {
...
@@ -129,7 +129,7 @@ func TestErrorReadingNonFile(t *testing.T) {
if
err
!=
nil
{
if
err
!=
nil
{
t
.
Fatalf
(
"Couldn't create tmpdir"
)
t
.
Fatalf
(
"Couldn't create tmpdir"
)
}
}
defer
os
.
Remove
(
tmpdir
)
defer
os
.
Remove
All
(
tmpdir
)
loadingRules
:=
ClientConfigLoadingRules
{
loadingRules
:=
ClientConfigLoadingRules
{
ExplicitPath
:
tmpdir
,
ExplicitPath
:
tmpdir
,
...
@@ -224,14 +224,15 @@ func TestResolveRelativePaths(t *testing.T) {
...
@@ -224,14 +224,15 @@ func TestResolveRelativePaths(t *testing.T) {
}
}
configDir1
,
_
:=
ioutil
.
TempDir
(
""
,
""
)
configDir1
,
_
:=
ioutil
.
TempDir
(
""
,
""
)
defer
os
.
RemoveAll
(
configDir1
)
configFile1
:=
path
.
Join
(
configDir1
,
".kubeconfig"
)
configFile1
:=
path
.
Join
(
configDir1
,
".kubeconfig"
)
configDir1
,
_
=
filepath
.
Abs
(
configDir1
)
configDir1
,
_
=
filepath
.
Abs
(
configDir1
)
defer
os
.
Remove
(
configFile1
)
configDir2
,
_
:=
ioutil
.
TempDir
(
""
,
""
)
configDir2
,
_
:=
ioutil
.
TempDir
(
""
,
""
)
defer
os
.
RemoveAll
(
configDir2
)
configDir2
,
_
=
ioutil
.
TempDir
(
configDir2
,
""
)
configDir2
,
_
=
ioutil
.
TempDir
(
configDir2
,
""
)
configFile2
:=
path
.
Join
(
configDir2
,
".kubeconfig"
)
configFile2
:=
path
.
Join
(
configDir2
,
".kubeconfig"
)
configDir2
,
_
=
filepath
.
Abs
(
configDir2
)
configDir2
,
_
=
filepath
.
Abs
(
configDir2
)
defer
os
.
Remove
(
configFile2
)
WriteToFile
(
pathResolutionConfig1
,
configFile1
)
WriteToFile
(
pathResolutionConfig1
,
configFile1
)
WriteToFile
(
pathResolutionConfig2
,
configFile2
)
WriteToFile
(
pathResolutionConfig2
,
configFile2
)
...
...
pkg/kubelet/cm/container_manager_linux_test.go
View file @
db75904b
...
@@ -152,6 +152,7 @@ func TestSoftRequirementsValidationSuccess(t *testing.T) {
...
@@ -152,6 +152,7 @@ func TestSoftRequirementsValidationSuccess(t *testing.T) {
req
:=
require
.
New
(
t
)
req
:=
require
.
New
(
t
)
tempDir
,
err
:=
ioutil
.
TempDir
(
""
,
""
)
tempDir
,
err
:=
ioutil
.
TempDir
(
""
,
""
)
req
.
NoError
(
err
)
req
.
NoError
(
err
)
defer
os
.
RemoveAll
(
tempDir
)
req
.
NoError
(
ioutil
.
WriteFile
(
path
.
Join
(
tempDir
,
"cpu.cfs_period_us"
),
[]
byte
(
"0"
),
os
.
ModePerm
))
req
.
NoError
(
ioutil
.
WriteFile
(
path
.
Join
(
tempDir
,
"cpu.cfs_period_us"
),
[]
byte
(
"0"
),
os
.
ModePerm
))
req
.
NoError
(
ioutil
.
WriteFile
(
path
.
Join
(
tempDir
,
"cpu.cfs_quota_us"
),
[]
byte
(
"0"
),
os
.
ModePerm
))
req
.
NoError
(
ioutil
.
WriteFile
(
path
.
Join
(
tempDir
,
"cpu.cfs_quota_us"
),
[]
byte
(
"0"
),
os
.
ModePerm
))
mountInt
:=
&
fakeMountInterface
{
mountInt
:=
&
fakeMountInterface
{
...
...
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