Merge pull request #2047 from smarterclayton/make_request_testable

Make client.Request/RESTClient more testable and fakeable
This commit is contained in:
Clayton Coleman
2014-10-29 19:33:36 -04:00
7 changed files with 536 additions and 173 deletions

View File

@@ -120,7 +120,7 @@ func startComponents(manifestURL string) (apiServerURL string) {
}
cl := client.NewOrDie(&client.Config{Host: apiServer.URL, Version: testapi.Version()})
cl.PollPeriod = time.Second * 1
cl.PollPeriod = time.Millisecond * 100
cl.Sync = true
helper, err := master.NewEtcdHelper(etcdClient, "")
@@ -312,7 +312,6 @@ func runAtomicPutTest(c *client.Client) {
err := c.Get().
Path("services").
Path(svc.Name).
PollPeriod(100 * time.Millisecond).
Do().
Into(&tmpSvc)
if err != nil {