Skip to content

Commit

Permalink
Delete all keys prior to running integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Aug 28, 2014
1 parent 4379fab commit e840062
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cmd/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ func startComponents(manifestURL string) (apiServerURL string) {
apiServer := httptest.NewServer(&handler)

etcdClient := etcd.NewClient(servers)
keys, err := etcdClient.Get("/", false, false)
if err != nil {
glog.Fatalf("Unable to list root etcd keys: %v", err)
}
for _, node := range keys.Node.Nodes {
if _, err := etcdClient.Delete(node.Key, true); err != nil {
glog.Fatalf("Unable delete key: %v", err)
}
}

cl := client.New(apiServer.URL, nil)
cl.PollPeriod = time.Second * 1
Expand Down

0 comments on commit e840062

Please sign in to comment.