Add integration test for ConfigMap

This commit is contained in:
Paul Morie
2016-01-18 09:35:29 -05:00
parent 318705feb9
commit e0ef253f7d
3 changed files with 142 additions and 5 deletions

View File

@@ -21,10 +21,12 @@ import (
"io/ioutil"
"math/rand"
"os"
"testing"
etcd "github.com/coreos/etcd/client"
"github.com/golang/glog"
"golang.org/x/net/context"
client "k8s.io/kubernetes/pkg/client/unversioned"
)
func newEtcdClient() etcd.Client {
@@ -77,3 +79,9 @@ func MakeTempDirOrDie(prefix string, baseDir string) string {
}
return tempDir
}
func deletePodOrErrorf(t *testing.T, c *client.Client, ns, name string) {
if err := c.Pods(ns).Delete(name, nil); err != nil {
t.Errorf("unable to delete pod %v: %v", name, err)
}
}