Commit Graph

8 Commits

Author SHA1 Message Date
Gareth Smith 8523ad31f8 Start the fixture processes in parallel 2017-11-29 12:08:31 +00:00
Gareth Smith 2e5a83252e Remove {Etcd,APIServer}StartStopper interfaces
... as they have been unified into the FixtureProcess interface and thus
they are not needed anymore.
2017-11-29 12:08:29 +00:00
Gareth Smith ddd0a5683f Unify fixture processes
Instead of the separate {Etcd,APIServer}StartStopper use the unified
interface FixtureProcess
2017-11-29 12:08:29 +00:00
Gareth Smith 940bec8b1c Refactor APIServer
- Store stdout,stderr in private buffers
- Configure the etcURL on construction instead of at start time
2017-11-29 12:08:29 +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
Hannes Hörl 0dfe20ef49 Use http:// as etcd URL scheme
Using tcp:// does not work.
2017-11-29 12:08:29 +00:00
Hannes Hörl 4e870ff442 Use ioutils.tempDir() to create temporary directories
os.tempDir() gives the path to the temporary directory, it does not
create a random temporary directory.
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