Commit Graph

462 Commits

Author SHA1 Message Date
Gareth Smith a04f00234e Rework fakes to allow additional arguments 2017-11-29 12:08:29 +00:00
Gareth Smith e7bb1e8df9 Add fixtures tintegration tests
Testing the lifecycle of our fixtures with the real binaries. Test if we
can start the fixtures, the porcesses actually listen on the ports and
if we tear down all the parts successfully again.
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
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
Hannes Hörl 8988075dad Wire the test framework in to the demo tests
We're not exercising the test framework yet, but it's in place.

Our democli expects its test assets to be in `./assets/bin`. We have a
script `./scripts/download-binaries.sh` which will populate that directory
from a google storage bucket.

Once those assets are in place, you can run tests with
`./scripts/run-tests.sh`.
2017-11-29 12:08:29 +00:00
Gareth Smith 1714b31d49 Add CI for local development
We're using concourse because we happen to have a concourse deployment
available. You can look at it here:

https://wings.concourse.ci/teams/k8s-c10s/
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
Gareth Smith 9d271bf497 Add apiserver launcher to test framework
To start an apiserver:

```
apiServer := APIServer{Path: "/path/to/my/apiserver/binary"}
session, err := apiServer.Start("tcp://whereever.is.my.etcd:port")
Expect(err).NotTo(HaveOccurred())
```

When you're done testing against that apiserver:

```
session.Terminate().Wait()
```

...or if you prefer:

```
gexec.Terminate()
```

...which will terminate not only this apiserver, but also all other
command sessions you started in this test.
2017-11-29 12:08:29 +00:00
Gareth Smith 782bee8a6b Add dependencies
As a separate commit, to make review easier.
2017-11-29 12:08:29 +00:00
Gareth Smith 9096006cb0 Add help text and barebones integration test
We use [ginkgo](http://onsi.github.io/ginkgo/) and
[gomega](http://onsi.github.io/gomega/) for testing. We generate some
boilerplate with:
```
mkdir integration
cd integration
ginkgo bootstrap
ginkgo generate integration
```

We use
[gexec](http://onsi.github.io/gomega/#gexec-testing-external-processes)
to compile and run the CLI under test, and to inspect its output.

We use `dep ensure` to ensure that all our dependencies are properly
vendored. From now on, this will be our workflow with every commit.
2017-11-29 12:08:29 +00:00
Gareth Smith c7957c3dfe Ignore goland's .idea directory 2017-11-29 12:08:29 +00:00
Gareth Smith bedfd1e72a Add dependencies
As a separate commit, to make review easier.
2017-11-29 12:08:29 +00:00
Gareth Smith 240dad6009 Add help text and barebones integration test
We use [ginkgo](http://onsi.github.io/ginkgo/) and
[gomega](http://onsi.github.io/gomega/) for testing. We generate some
boilerplate with:
```
mkdir integration
cd integration
ginkgo bootstrap
ginkgo generate integration
```

We use
[gexec](http://onsi.github.io/gomega/#gexec-testing-external-processes)
to compile and run the CLI under test, and to inspect its output.

We use `dep ensure` to ensure that all our dependencies are properly
vendored. From now on, this will be our workflow with every commit.
2017-11-29 12:08:28 +00:00
k8s-ci-robot 13edad74b4
Merge pull request #129 from apelisse/use-deps
Use deps
2017-11-28 14:51:23 -08:00
Phillip Wittrock 7e06942dcb
Update comment in .travis.yml 2017-11-28 14:49:49 -08:00
Antoine Pelisse 12faeb563e Create dummy install target to prevent `go get`
Since we use deps, we don't need to run `go get`, so let's skip that part.
2017-11-28 14:35:08 -08:00
Antoine Pelisse a2bef50132 README: Mention that we're using dep for dependencies 2017-11-28 14:35:08 -08:00
Antoine Pelisse 8b7c3cd5c2 Run to install dependencies 2017-11-28 14:35:07 -08:00
Antoine Pelisse b4f3d605ca Comment unused function that depends on k8s.io/kubernetes 2017-11-28 14:35:06 -08:00
Antoine Pelisse 4312d1e34a
Merge pull request #130 from apelisse/improve-travis
Simplify travis script, work against `vendor/`
2017-11-28 14:34:21 -08:00
Antoine Pelisse c8548960ba Simplify travis script, work against `vendor/`
The current travis script currently fails if we have a `vendor/`
directory, and is also quite longer than necessary.
2017-11-28 11:22:07 -08:00
Jeff Regan 404489a5c3
Merge pull request #145 from monopole/tweakForVendoring
Tweak pre-commit to ignore vendor directory.
2017-11-20 17:26:07 -08:00
Jeffrey Regan 4b7a63c631 Tweak pre-commit to ignore vendor directory. 2017-11-20 17:21:59 -08:00
Jeff Regan 964d21613b
Merge pull request #128 from apelisse/improve-readme
Clarify requirements in README.md
2017-11-20 16:43:48 -08:00
Antoine Pelisse b948167a49 Clarify requirements in README.md 2017-11-16 13:48:19 -08:00
Phillip Wittrock bcbe5fae3f
Merge pull request #112 from spiffxp/assignees-to-approvers
Rename OWNERS assignees: to approvers:
2017-11-06 13:57:54 -08:00
Aaron Crickenberger 59f7525165 They are effectively the same, assignees is deprecated 2017-10-31 16:35:21 -07:00
Jeff Regan cad6d3ff4d
Merge pull request #111 from monopole/tweakTravisExit
Tweak travis early exit
2017-10-28 13:58:00 -07:00
jregan b703b6403d Tweak travis early exit 2017-10-28 13:47:12 -07:00
Jeff Regan 62d6ef9449
Merge pull request #108 from monopole/travisSkipMarkdownOnlyPrs
Skip CICD build on markdown or doc changes.
2017-10-28 07:39:10 -07:00
Jeffrey Regan 3c7314e56a Skip CICD build on markdown or doc changes. 2017-10-28 07:32:10 -07:00
Jeff Regan 7cb1643182 Merge pull request #106 from kubernetes/pwittrock-grooming-issues
Create issue_backlog.md
2017-10-26 15:50:33 -07:00
Jeff Regan 2da4c5ab74 spelling 2017-10-26 15:32:50 -07:00
Jeff Regan 5de1c993b7 arrogant penguin 2017-10-26 15:29:09 -07:00
Jeff Regan 4ea3fe2e94 moar nits 2017-10-26 15:24:12 -07:00
Jeff Regan 8b44ea1e61 more nits 2017-10-26 15:07:50 -07:00
Jeff Regan 26207ea4ec fix some nits 2017-10-26 15:04:07 -07:00
Phillip Wittrock 8433daa9c3 Update issue_backlog.md 2017-10-26 13:30:46 -07:00
Phillip Wittrock e662d42932 Update issue_backlog.md 2017-10-25 16:29:03 -07:00
Phillip Wittrock 72c18e1391 Update issue_backlog.md 2017-10-25 16:28:39 -07:00
Phillip Wittrock 5b55c11471 Create issue_backlog.md 2017-10-25 16:26:44 -07:00
Jeff Regan 1b8fe6c368 Merge pull request #105 from monopole/beans
tweak precommit
2017-10-25 11:08:41 -07:00
Jeffrey Regan 1139d1d57b tweakprecommit 2017-10-25 10:29:36 -07:00
Jeff Regan d249dff292 Merge pull request #103 from monopole/addTravis
Add travis CICD coverage.
2017-10-24 21:37:36 -07:00
Jeffrey Regan e7cac07c74 Add travis CICD coverage.
Also, rename "kexpand" to "kinflate" to ease pronunciation.
2017-10-24 21:33:30 -07:00
Jeff Regan 4774644b76 Merge pull request #102 from mengqiy/kexpand_util
add kexpand util
2017-10-24 19:05:18 -07:00
ymqytw 2f2a39a77e kexpand util 2017-10-23 12:43:03 -07:00
Phillip Wittrock 38692bde32 Merge pull request #85 from pwittrock/master
Add items to Maintainers tasks
2017-10-18 12:46:26 -07:00