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.
23 lines
374 B
23 lines
374 B
9 years ago
|
package kubectl
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestPrintCreate(t *testing.T) {
|
||
|
var client Runner = PrintRunner{}
|
||
|
|
||
|
expected := `[CMD] kubectl create -f - < some stdin data`
|
||
|
|
||
|
out, err := client.Create([]byte("some stdin data"))
|
||
|
if err != nil {
|
||
|
t.Error(err)
|
||
|
}
|
||
|
|
||
|
actual := string(out)
|
||
|
|
||
|
if expected != actual {
|
||
|
t.Fatalf("actual %s != expected %s", actual, expected)
|
||
|
}
|
||
|
}
|