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
7c4cad5c
Commit
7c4cad5c
authored
Aug 29, 2016
by
vaikas-google
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
address lint comments from changing from all caps to camelcase
parent
c2a86cfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
release_server.go
cmd/tiller/release_server.go
+3
-3
release_server_test.go
cmd/tiller/release_server_test.go
+6
-6
No files found.
cmd/tiller/release_server.go
View file @
7c4cad5c
...
...
@@ -48,11 +48,11 @@ var srv *releaseServer
// characters in length. See https://github.com/kubernetes/helm/issues/1071
const
releaseNameMaxLen
=
14
// NOTES
.txt suffix
that we want to treat special. It goes through the templating engine
// NOTES
FILE_SUFFIX
that we want to treat special. It goes through the templating engine
// but it's not a yaml file (resource) hence can't have hooks, etc. And the user actually
// wants to see this file after rendering in the status command. However, it must be a suffix
// since there can be filepath in front of it.
const
NOTES_FILE_SUFFIX
=
"NOTES.txt"
const
notesFileSuffix
=
"NOTES.txt"
func
init
()
{
srv
=
&
releaseServer
{
...
...
@@ -467,7 +467,7 @@ func (s *releaseServer) renderResources(ch *chart.Chart, values chartutil.Values
// it in the sortHooks.
notes
:=
""
for
k
,
v
:=
range
files
{
if
strings
.
HasSuffix
(
k
,
NOTES_FILE_SUFFIX
)
{
if
strings
.
HasSuffix
(
k
,
notesFileSuffix
)
{
notes
=
v
delete
(
files
,
k
)
}
...
...
cmd/tiller/release_server_test.go
View file @
7c4cad5c
...
...
@@ -35,7 +35,7 @@ import (
"k8s.io/helm/pkg/storage/driver"
)
const
NOTES_TEXT
=
"my notes here"
const
notesText
=
"my notes here"
var
manifestWithHook
=
`apiVersion: v1
kind: ConfigMap
...
...
@@ -244,7 +244,7 @@ func TestInstallReleaseWithNotes(t *testing.T) {
Templates
:
[]
*
chart
.
Template
{
{
Name
:
"hello"
,
Data
:
[]
byte
(
"hello: world"
)},
{
Name
:
"hooks"
,
Data
:
[]
byte
(
manifestWithHook
)},
{
Name
:
"NOTES.txt"
,
Data
:
[]
byte
(
NOTES_TEXT
)},
{
Name
:
"NOTES.txt"
,
Data
:
[]
byte
(
notesText
)},
},
},
}
...
...
@@ -273,8 +273,8 @@ func TestInstallReleaseWithNotes(t *testing.T) {
t
.
Errorf
(
"Unexpected manifest: %v"
,
rel
.
Hooks
[
0
]
.
Manifest
)
}
if
rel
.
Info
.
Status
.
Notes
!=
NOTES_TEXT
{
t
.
Fatalf
(
"Expected '%s', got '%s'"
,
NOTES_TEXT
,
rel
.
Info
.
Status
.
Notes
)
if
rel
.
Info
.
Status
.
Notes
!=
notesText
{
t
.
Fatalf
(
"Expected '%s', got '%s'"
,
notesText
,
rel
.
Info
.
Status
.
Notes
)
}
if
rel
.
Hooks
[
0
]
.
Events
[
0
]
!=
release
.
Hook_POST_INSTALL
{
...
...
@@ -309,7 +309,7 @@ func TestInstallReleaseWithNotesRendered(t *testing.T) {
Templates
:
[]
*
chart
.
Template
{
{
Name
:
"hello"
,
Data
:
[]
byte
(
"hello: world"
)},
{
Name
:
"hooks"
,
Data
:
[]
byte
(
manifestWithHook
)},
{
Name
:
"NOTES.txt"
,
Data
:
[]
byte
(
NOTES_TEXT
+
" {{.Release.Name}}"
)},
{
Name
:
"NOTES.txt"
,
Data
:
[]
byte
(
notesText
+
" {{.Release.Name}}"
)},
},
},
}
...
...
@@ -338,7 +338,7 @@ func TestInstallReleaseWithNotesRendered(t *testing.T) {
t
.
Errorf
(
"Unexpected manifest: %v"
,
rel
.
Hooks
[
0
]
.
Manifest
)
}
expectedNotes
:=
fmt
.
Sprintf
(
"%s %s"
,
NOTES_TEXT
,
res
.
Release
.
Name
)
expectedNotes
:=
fmt
.
Sprintf
(
"%s %s"
,
notesText
,
res
.
Release
.
Name
)
if
rel
.
Info
.
Status
.
Notes
!=
expectedNotes
{
t
.
Fatalf
(
"Expected '%s', got '%s'"
,
expectedNotes
,
rel
.
Info
.
Status
.
Notes
)
}
...
...
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