mirror of https://github.com/helm/helm
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
754 B
34 lines
754 B
9 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/deis/tiller/cmd/tiller/environment"
|
||
|
"github.com/deis/tiller/pkg/engine"
|
||
9 years ago
|
"github.com/deis/tiller/pkg/storage"
|
||
9 years ago
|
)
|
||
|
|
||
|
// These are canary tests to make sure that the default server actually
|
||
|
// fulfills its requirements.
|
||
|
var _ environment.Engine = &engine.Engine{}
|
||
9 years ago
|
var _ environment.ReleaseStorage = storage.NewMemory()
|
||
9 years ago
|
|
||
9 years ago
|
func TestInit(t *testing.T) {
|
||
9 years ago
|
defer func() {
|
||
|
if recover() != nil {
|
||
|
t.Fatalf("Panic trapped. Check EngineYard.Default()")
|
||
|
}
|
||
|
}()
|
||
|
|
||
|
// This will panic if it is not correct.
|
||
9 years ago
|
env.EngineYard.Default()
|
||
9 years ago
|
|
||
9 years ago
|
e, ok := env.EngineYard.Get(environment.GoTplEngine)
|
||
9 years ago
|
if !ok {
|
||
|
t.Fatalf("Could not find GoTplEngine")
|
||
|
}
|
||
|
if e == nil {
|
||
|
t.Fatalf("Template engine GoTplEngine returned nil.")
|
||
|
}
|
||
|
}
|