This commit is contained in:
Chao Xu
2016-11-18 13:31:44 -08:00
parent d0a725a522
commit 31ed340eec
8 changed files with 99 additions and 53 deletions

View File

@@ -19,7 +19,7 @@ package system
import (
"testing"
"k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/v1"
)
func TestIsMasterNode(t *testing.T) {
@@ -37,8 +37,8 @@ func TestIsMasterNode(t *testing.T) {
}
for _, tc := range testCases {
node := api.Node{ObjectMeta: api.ObjectMeta{Name: tc.input}}
res := IsMasterNode(&node)
node := v1.Node{ObjectMeta: v1.ObjectMeta{Name: tc.input}}
res := IsMasterNode(node.Name)
if res != tc.result {
t.Errorf("case \"%s\": expected %t, got %t", tc.input, tc.result, res)
}