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
44dc0de7
Commit
44dc0de7
authored
Apr 13, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(server): add tests for in-memory storage
This adds a higher level set of tests for storage.
parent
fa6a33c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
environment.go
cmd/tiller/environment/environment.go
+11
-1
server_test.go
cmd/tiller/server_test.go
+2
-0
No files found.
cmd/tiller/environment/environment.go
View file @
44dc0de7
...
...
@@ -3,10 +3,15 @@ package environment
import
(
"github.com/deis/tiller/pkg/engine"
"github.com/deis/tiller/pkg/hapi"
"github.com/deis/tiller/pkg/storage"
)
// GoTplEngine is the name of the Go template engine, as registered in the EngineYard.
const
GoTplEngine
=
"gotpl"
// DefaultEngine points to the engine that the EngineYard should treat as the
// default. A chart that does not specify an engine may be run through the
// default engine.
var
DefaultEngine
=
GoTplEngine
// EngineYard maps engine names to engine implementations.
...
...
@@ -93,8 +98,13 @@ type Environment struct {
// New returns an environment initialized with the defaults.
func
New
()
*
Environment
{
e
:=
engine
.
New
()
var
ey
EngineYard
=
map
[
string
]
Engine
{
GoTplEngine
:
e
}
var
ey
EngineYard
=
map
[
string
]
Engine
{
// Currently, the only template engine we support is the GoTpl one. But
// we can easily add some here.
GoTplEngine
:
e
,
}
return
&
Environment
{
EngineYard
:
ey
,
Releases
:
storage
.
NewMemory
(),
}
}
cmd/tiller/server_test.go
View file @
44dc0de7
...
...
@@ -5,11 +5,13 @@ import (
"github.com/deis/tiller/cmd/tiller/environment"
"github.com/deis/tiller/pkg/engine"
"github.com/deis/tiller/pkg/storage"
)
// These are canary tests to make sure that the default server actually
// fulfills its requirements.
var
_
environment
.
Engine
=
&
engine
.
Engine
{}
var
_
environment
.
ReleaseStorage
=
storage
.
NewMemory
()
func
TestNewServer
(
t
*
testing
.
T
)
{
defer
func
()
{
...
...
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