Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
e8aa8d36
Commit
e8aa8d36
authored
May 11, 2017
by
Matt Butcher
Committed by
GitHub
May 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2405 from sushilkm/linting-fixes
Fixed issues reported by test-style
parents
a9f0be9b
61c3a44d
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
16 additions
and
13 deletions
+16
-13
Makefile
Makefile
+2
-0
completion.go
cmd/helm/completion.go
+5
-5
fetch.go
cmd/helm/fetch.go
+1
-1
package.go
cmd/helm/package.go
+1
-1
package_test.go
cmd/helm/package_test.go
+1
-1
repo_add.go
cmd/helm/repo_add.go
+1
-1
reset.go
cmd/helm/reset.go
+1
-1
reset_test.go
cmd/helm/reset_test.go
+1
-1
rudder.go
cmd/rudder/rudder.go
+1
-0
manager.go
pkg/downloader/manager.go
+1
-1
environment_test.go
pkg/releasetesting/environment_test.go
+1
-1
No files found.
Makefile
View file @
e8aa8d36
...
...
@@ -88,6 +88,8 @@ test: test-unit
.PHONY
:
test-unit
test-unit
:
@
echo
@
echo
"==> Running unit tests <=="
HELM_HOME
=
/no/such/dir
$(GO)
test
$(GOFLAGS)
-run
$(TESTS)
$(PKG)
$(TESTFLAGS)
.PHONY
:
test-style
...
...
cmd/helm/completion.go
View file @
e8aa8d36
...
...
@@ -53,7 +53,7 @@ func newCompletionCmd(out io.Writer) *cobra.Command {
Short
:
"Generate autocompletions script for the specified shell (bash or zsh)"
,
Long
:
completionDesc
,
RunE
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
return
R
unCompletion
(
out
,
cmd
,
args
)
return
r
unCompletion
(
out
,
cmd
,
args
)
},
ValidArgs
:
shells
,
}
...
...
@@ -61,16 +61,16 @@ func newCompletionCmd(out io.Writer) *cobra.Command {
return
cmd
}
func
R
unCompletion
(
out
io
.
Writer
,
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
func
r
unCompletion
(
out
io
.
Writer
,
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
if
len
(
args
)
==
0
{
return
fmt
.
Errorf
(
"
Shell not specified.
"
)
return
fmt
.
Errorf
(
"
shell not specified
"
)
}
if
len
(
args
)
>
1
{
return
fmt
.
Errorf
(
"
Too many arguments. Expected only the shell type.
"
)
return
fmt
.
Errorf
(
"
too many arguments, expected only the shell type
"
)
}
run
,
found
:=
completionShells
[
args
[
0
]]
if
!
found
{
return
fmt
.
Errorf
(
"
Unsupported shell type %q.
"
,
args
[
0
])
return
fmt
.
Errorf
(
"
unsupported shell type %q
"
,
args
[
0
])
}
return
run
(
out
,
cmd
)
...
...
cmd/helm/fetch.go
View file @
e8aa8d36
...
...
@@ -73,7 +73,7 @@ func newFetchCmd(out io.Writer) *cobra.Command {
Long
:
fetchDesc
,
RunE
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
if
len
(
args
)
==
0
{
return
fmt
.
Errorf
(
"
This command needs at least one argument, url or repo/name of the chart.
"
)
return
fmt
.
Errorf
(
"
need at least one argument, url or repo/name of the chart
"
)
}
for
i
:=
0
;
i
<
len
(
args
);
i
++
{
fch
.
chartRef
=
args
[
i
]
...
...
cmd/helm/package.go
View file @
e8aa8d36
...
...
@@ -72,7 +72,7 @@ func newPackageCmd(out io.Writer) *cobra.Command {
RunE
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
pkg
.
home
=
settings
.
Home
if
len
(
args
)
==
0
{
return
fmt
.
Errorf
(
"
This command needs at least one argument, the path to the chart.
"
)
return
fmt
.
Errorf
(
"
need at least one argument, the path to the chart
"
)
}
if
pkg
.
sign
{
if
pkg
.
key
==
""
{
...
...
cmd/helm/package_test.go
View file @
e8aa8d36
...
...
@@ -64,7 +64,7 @@ func TestPackage(t *testing.T) {
name
:
"package without chart path"
,
args
:
[]
string
{},
flags
:
map
[
string
]
string
{},
expect
:
"
This command needs at least one argument, the path to the chart.
"
,
expect
:
"
need at least one argument, the path to the chart
"
,
err
:
true
,
},
{
...
...
cmd/helm/repo_add.go
View file @
e8aa8d36
...
...
@@ -85,7 +85,7 @@ func addRepository(name, url string, home helmpath.Home, certFile, keyFile, caFi
}
if
noUpdate
&&
f
.
Has
(
name
)
{
return
fmt
.
Errorf
(
"
The repository name you provided (%s) already exists. Please specify a different name.
"
,
name
)
return
fmt
.
Errorf
(
"
repository name (%s) already exists, please specify a different name
"
,
name
)
}
cif
:=
home
.
CacheIndex
(
name
)
...
...
cmd/helm/reset.go
View file @
e8aa8d36
...
...
@@ -96,7 +96,7 @@ func (d *resetCmd) run() error {
}
if
len
(
res
.
Releases
)
>
0
&&
!
d
.
force
{
return
fmt
.
Errorf
(
"
There are still %d deployed releases (Tip: use --force).
"
,
len
(
res
.
Releases
))
return
fmt
.
Errorf
(
"
there are still %d deployed releases (Tip: use --force)
"
,
len
(
res
.
Releases
))
}
if
err
:=
installer
.
Uninstall
(
d
.
kubeClient
,
&
installer
.
Options
{
Namespace
:
d
.
namespace
});
err
!=
nil
{
...
...
cmd/helm/reset_test.go
View file @
e8aa8d36
...
...
@@ -120,7 +120,7 @@ func TestReset_deployedReleases(t *testing.T) {
namespace
:
api
.
NamespaceDefault
,
}
err
=
cmd
.
run
()
expected
:=
"
T
here are still 1 deployed releases (Tip: use --force)"
expected
:=
"
t
here are still 1 deployed releases (Tip: use --force)"
if
!
strings
.
Contains
(
err
.
Error
(),
expected
)
{
t
.
Errorf
(
"unexpected error: %v"
,
err
)
}
...
...
cmd/rudder/rudder.go
View file @
e8aa8d36
...
...
@@ -126,6 +126,7 @@ func (r *ReleaseModuleServiceServer) UpgradeRelease(ctx context.Context, in *rud
return
&
rudderAPI
.
UpgradeReleaseResponse
{},
err
}
// ReleaseStatus retrieves release status
func
(
r
*
ReleaseModuleServiceServer
)
ReleaseStatus
(
ctx
context
.
Context
,
in
*
rudderAPI
.
ReleaseStatusRequest
)
(
*
rudderAPI
.
ReleaseStatusResponse
,
error
)
{
grpclog
.
Print
(
"status"
)
...
...
pkg/downloader/manager.go
View file @
e8aa8d36
...
...
@@ -572,5 +572,5 @@ func tarFromLocalDir(chartpath string, name string, repo string, version string)
return
ch
.
Metadata
.
Version
,
err
}
return
""
,
fmt
.
Errorf
(
"
Can't get a valid version for dependency %s.
"
,
name
)
return
""
,
fmt
.
Errorf
(
"
can't get a valid version for dependency %s
"
,
name
)
}
pkg/releasetesting/environment_test.go
View file @
e8aa8d36
...
...
@@ -123,7 +123,7 @@ func newGetFailingKubeClient() *getFailingKubeClient {
}
func
(
p
*
getFailingKubeClient
)
Get
(
ns
string
,
r
io
.
Reader
)
(
string
,
error
)
{
return
""
,
errors
.
New
(
"
In the end, they did not find Nemo.
"
)
return
""
,
errors
.
New
(
"
in the end, they did not find Nemo
"
)
}
type
deleteFailingKubeClient
struct
{
...
...
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