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
012b0f7c
Commit
012b0f7c
authored
May 11, 2016
by
vaikas-google
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update the lint_test for correct errors
parent
7edce9b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
10 deletions
+8
-10
lint_test.go
pkg/lint/lint_test.go
+8
-10
No files found.
pkg/lint/lint_test.go
View file @
012b0f7c
...
...
@@ -6,7 +6,7 @@ import (
"testing"
)
const
badChartDir
=
"testdata/badchart
version
"
const
badChartDir
=
"testdata/badchart
file
"
const
badYamlFileDir
=
"testdata/albatross"
const
goodChartDir
=
"testdata/goodone"
...
...
@@ -15,26 +15,24 @@ func TestBadChart(t *testing.T) {
if
len
(
m
)
!=
3
{
t
.
Errorf
(
"All didn't fail with expected errors, got %#v"
,
m
)
}
// There should be
INFO, WARNING and
ERROR messages, check for them
var
i
,
w
,
e
=
false
,
false
,
false
// There should be
2 WARNINGs and one
ERROR messages, check for them
var
w
,
e
,
e2
=
false
,
false
,
false
for
_
,
msg
:=
range
m
{
if
msg
.
Severity
==
InfoSev
{
if
strings
.
Contains
(
msg
.
Text
,
"values.toml"
)
{
i
=
true
}
}
if
msg
.
Severity
==
WarningSev
{
if
strings
.
Contains
(
msg
.
Text
,
"No templates"
)
{
w
=
true
}
}
if
msg
.
Severity
==
ErrorSev
{
if
strings
.
Contains
(
msg
.
Text
,
"
Chart.yaml does not exist
"
)
{
if
strings
.
Contains
(
msg
.
Text
,
"
must be greater than 0.0.0
"
)
{
e
=
true
}
if
strings
.
Contains
(
msg
.
Text
,
"'name' is required"
)
{
e2
=
true
}
}
}
if
!
i
||
!
w
||
!
e
{
if
!
e
||
!
e2
||
!
w
{
t
.
Errorf
(
"Didn't find all the expected errors, got %#v"
,
m
)
}
}
...
...
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