Commit Graph

6 Commits

Author SHA1 Message Date
Hannes Hörl 1923179219 Use a fake datadir manager in etcd tests 2017-12-04 17:32:03 +00:00
Hannes Hörl 9fa768de26 Refactor Etcd to use a simpler CLI Session
We introduced a SimpleSession interface which allows us to have better
fakes for unit testing. This Session is implemented by *gexec.Session.
2017-12-04 12:19:59 +00:00
Gareth Smith 2fd15f82f9 Refactor Etcd
- Store stdout,stderr in private buffers
- Configure the etcURL on construction instead of at start time
- Handle the creation of the temporary directory (for the data
  directory) internally
2017-11-29 12:08:29 +00:00
Gareth Smith 8a92d310ba Make Stop() wait for the processes to exit 2017-11-29 12:08:29 +00:00
Gareth Smith fc5d4050b1 Add Fixtures struct, which can start+stop everything
Create a new set of test fixtures by doing:

```
f := test.NewFixtures("/path/to/etcd", "/path/to/apiserver")
```

Before running your integration tests, start all your fixtures:

```
err := f.Start()
Expect(err).NotTo(HaveOccurred())
```

Now that you have started your etcd and apiserver, you'll find the
apiserver listening locally on the default port. When you're done with
your testing, stop and clean up:

```
err := f.Stop()
Expect(err).NotTo(HaveOccurred())
```
2017-11-29 12:08:29 +00:00
Hannes Hoerl 677652447e Add etcd launcher to test framework
This can be started and stopped the same way as the apiserver.
2017-11-29 12:08:29 +00:00