Refactor providers and add tests

- Add a `baseProvider` struct with common
- Refactor docker, kv(s) and marathon providers (spliting into small pieces)
- Add unit tests

Signed-off-by: Vincent Demeester <vincent@sbr.pm>
This commit is contained in:
Vincent Demeester 2015-11-13 11:50:32 +01:00
parent 3f905ee7d0
commit 4d485e1b6b
14 changed files with 2319 additions and 438 deletions

View file

@ -15,7 +15,7 @@ func (s *FileSuite) TestSimpleConfiguration(c *check.C) {
c.Assert(err, checker.IsNil)
defer cmd.Process.Kill()
time.Sleep(500 * time.Millisecond)
time.Sleep(1000 * time.Millisecond)
resp, err := http.Get("http://127.0.0.1/")
// Expected a 404 as we did not configure anything
@ -30,7 +30,7 @@ func (s *FileSuite) TestSimpleConfigurationNoPanic(c *check.C) {
c.Assert(err, checker.IsNil)
defer cmd.Process.Kill()
time.Sleep(500 * time.Millisecond)
time.Sleep(1000 * time.Millisecond)
resp, err := http.Get("http://127.0.0.1/")
// Expected a 404 as we did not configure anything