@ -4,9 +4,6 @@ package e2e
import (
import (
"net/http"
"net/http"
"os"
"path"
"path/filepath"
"testing"
"testing"
"time"
"time"
)
)
@ -26,7 +23,7 @@ type HelmContext struct {
func NewHelmContext ( t * testing . T ) * HelmContext {
func NewHelmContext ( t * testing . T ) * HelmContext {
return & HelmContext {
return & HelmContext {
t : t ,
t : t ,
Path : RepoRoot ( ) + " /bin/ helm",
Path : " helm",
Timeout : time . Second * 20 ,
Timeout : time . Second * 20 ,
}
}
}
}
@ -50,7 +47,7 @@ func (h *HelmContext) Run(args ...string) *Cmd {
func ( h * HelmContext ) RunFail ( args ... string ) * Cmd {
func ( h * HelmContext ) RunFail ( args ... string ) * Cmd {
cmd := h . newCmd ( args ... )
cmd := h . newCmd ( args ... )
if status := cmd . exec ( ) ; status == nil {
if status := cmd . exec ( ) ; status == nil {
h . t . Fatalf ( "helm unexpected to fail: %v ", args , status )
h . t . Fatalf ( "helm unexpected to fail: %v %v ", args , status )
}
}
return cmd
return cmd
}
}
@ -76,7 +73,3 @@ func (h *HelmContext) Running() bool {
//out := h.MustRun("server", "status").Stdout()
//out := h.MustRun("server", "status").Stdout()
//return strings.Count(out, "Running") == 5
//return strings.Count(out, "Running") == 5
}
}
func RepoRoot ( ) string {
return filepath . Clean ( filepath . Join ( path . Base ( os . Args [ 0 ] ) , "../../.." ) )
}