Commit Graph

101 Commits

Author SHA1 Message Date
Daniel McCarney 72b65d82c5 Update certbot tests (#2027)
This PR changes the `certbot` integration tests that are run from the `0.8.0` release to master.

Note: this is only updating the *tests* that are run. We continue to invoke the `certbot` binary that is installed from jessie-backports as part of the `boulder-tools` image.

This fixes #2021
2016-07-08 14:34:45 -04:00
Jacob Hoffman-Andrews fd095b8881 Fix Docker test builds: latest certbot and grpc (#1991)
The `letsencrypt/boulder-tools` image was recently updated, pulling in version
0.8.0 of certbot. That version stores the output of `certonly` requests in a
different path. In test.sh, we check out a specific tagged release of certbot in
order to get its integration tests. Prior to this commit, we were using
certbot 0.8.0 with the integration tests from version 0.6.0 of certbot,
which looked for `certonly` output in the wrong place, and failed.

This commit changes test.sh to checkout the 0.8.0 branch, and also removes a
temporary shim we used to make the `certbot` command call out to the
`letsencrypt` command.

Also, since the latest version of `letsencrypt/boulder-tools` includes an updated
`protoc-gen-go`, this change also updates the support packages to match.
2016-06-29 10:54:03 -07:00
Jacob Hoffman-Andrews 567bc8027a Remove existence check for gover and goveralls. (#1850)
Since they are only run inside an "if Travis" block, and we know those tools are
installed in the Docker image we use on Travis. This restores coverage reporting
to our builds.

https://github.com/letsencrypt/boulder/pull/1850
2016-05-27 10:05:11 -07:00
bmw 09de6dd4b1 Check out last certbot release (#1845)
Hack to fix integration test failures
2016-05-25 18:32:12 -07:00
Jacob Hoffman-Andrews 71e4af43f7 Roll forward "Run Travis tests in Docker (#1830)" (#1838)
That change broke the certbot tests because it switched to a MariaDB
10.1-specific syntax. certbot/certbot#3058 changes the certbot tests to use
Boulder's docker-compose.yml, so they will get MariaDB 10.1 automatically.
2016-05-24 15:11:22 -07:00
Jacob Hoffman-Andrews b954dcc010 Revert "Run Travis tests in Docker (#1830)" (#1834)
This reverts commit 92d94f2 and commit 0b4623f to unbreak the Certbot build.
2016-05-20 15:57:10 -07:00
Jacob Hoffman-Andrews 92d94f2558 Run Travis tests in Docker (#1830)
* MariaDB 10.1

* MariaDB 10.1 in Docker

* Run docker stuff.

* Improve test.js error.

* Lower log level

* Revert dockerfile to master

* Export debug ports, set FAKE_DNS, and remove container_name.

* Remove typo.

* Make integration-test.py wait for debug ports.

* Use 10.1 and export more Boulder ports.

* Test updates for Docker

Listen on 0.0.0.0 for utility servers.
Make integration-test.py just wait for ports rather than calling startservers.
Run docker-compose in test.sh.
Remove bypass when database exists.
Separate mailer test into its own function in integration test.
Print better errors in test.js.

* Always bring up mysql container.

* Wait for MySQL to come up.

* Put it in travis-before-install.

* Use 127

* Remove manual docker-up.

* Add ifconfig

* Switch to docker-compose run

* It works!

* Remove some spurious env vars.

* Add bash

* try running it

* Add all deps.

* Pass through env.

* Install everything in the Dockerfile.

* Fix install of ruby

* More improvements

* Revert integration test to run directly
Also remove .git from dockerignore and add some packages.

* Revert integration-test.py to master.

* Stop ignoring test/js

* Start from boulder-tools.

* Add boulder-tools.

* Tweak travis.yml

* Separate out docker-compose pull as install.

* Build in install phase; don't bother with go install in Dockerfile

* Add virtualenv

* Actually build rabbitmq-setup

* Remove FAKE_DNS

* Trivial change

* Pull boulder-tools as a separate step so it gets its own timing info.

* Install certbot and protobuf from repos.

* Use cerbot from debian backports.

* Fix clone

* Remove CERTBOT_PATH

* Updates

* Go back to letsencrypt for build.sh

* Remove certbot volume.

* go back to preinstalled letsencrypt

* Restore ENV

* Remove BASH_ENV

* Adapt reloader test so it psses when run as root.

* Fixups for review.

* Revert test.js

* Revert startservers.py

* Revert Makefile.
2016-05-19 16:29:45 -07:00
Jacob Hoffman-Andrews e45cd826f7 Remove github-pr-status in test.sh. (#1827) 2016-05-16 17:51:21 -07:00
Jacob Hoffman-Andrews 4e60e4bb59 Restore testing of godep restore. (#1821)
PR #1808 accidentally removed the main diff.
Also, leave out diffing of Godeps in the `go generate` test.

https://github.com/letsencrypt/boulder/pull/1821
2016-05-14 22:03:47 +02:00
Roland Bracewell Shoemaker 28f851c375 Strip out Godep version before diffing Godeps.json (#1808)
This means our tests won't break when the Godep version is increased.
2016-05-12 17:43:46 -07:00
Jacob Hoffman-Andrews 7208052ad6 Change paths to match certbot renaming. (#1792) 2016-05-06 15:57:07 -07:00
Jacob Hoffman-Andrews f776343d4e Remove forked repo godep restore exception. (#1786) 2016-05-05 11:22:17 -07:00
Jacob Hoffman-Andrews 702a0dbb0c Hard-fail godep-restore. (#1767) 2016-04-25 11:49:34 -07:00
Jacob Hoffman-Andrews 6d5348f975 Run go generate in Travis (#1762)
* Fix go generate command in metrics.

The previous command only worked on OS X. This one works on Linux but not
OS X.

Also add generate phase of test.sh.

* Add mockgen to test setup.

* Fix github-pr-status output.

* Fix envvar style.

* Set xtrace.

* Fix test.sh

* Fix test.sh some more.

* Fix mockgen command.

* Add dependencies for running `go generate`.

* Add protoc-gen-go.

* Fix go get command.

* Fix generate.

* Wait for all.

* Fix generate.

* Update generated pb.

* Fix generate commands for vendored world.

* Update documentation for new vendor style.

* Update grpc package to latest.

* Update caaChecker proto with latest.

* Run go generate only over TESTPATHS

* See if Travis passes under 1.6

* Switch back to 1.5.

* Trim run command.

* Run stringer from correct directory.

* Move generate command.

* Restore and generate

* Fix path.

* list contents of GOPATH.

* Fix stringer by prebuilding.

* Try another import path.

* regenerate bcode_string.

* remove excess package

* pull jsha fork of protoc-gen-go that echoes

* Echo protoc version.

* install from source

* CD back.

* Go back to normal protoc-gen-go

* Fix path

* Move protobuf install into test/setup.sh

* Move before_install to install.

* Set PATH.

* Follow 301 with curl.

* Shuffle test order.

* Swap back test order.

* Restore all tests.

* Restore 1.5.3 to Travis.

* Remove unnecessary wait-or-exit

* Generate metrics mock with latest mockgen.

* Wrap TESTPATHS in curlies

* Remove spurious bracket
2016-04-21 15:23:06 -07:00
bmw ea52c2130b Use tools/venv.sh from client repo in integration tests (#1752) 2016-04-18 16:50:26 -07:00
Jacob Hoffman-Andrews e6c17e1717 Switch to new vendor style (#1747)
* Switch to new vendor style.

* Fix metrics generate command.

* Fix miekg/dns types_generate.

* Use generated copies of files.

* Update miekg to latest.

Fixes a problem with `go generate`.

* Set GO15VENDOREXPERIMENT.

* Build in letsencrypt/boulder.

* fix travis more.

* Exclude vendor instead of godeps.

* Replace some ...

* Fix unformatted cmd

* Fix errcheck for vendorexp

* Add GO15VENDOREXPERIMENT to Makefile.

* Temp disable errcheck.

* Restore master fetch.

* Restore errcheck.

* Build with 1.6 also.

* Match statsd.*"

* Skip errcheck unles Go1.6.

* Add other ignorepkg.

* Fix errcheck.

* move errcheck

* Remove go1.6 requirement.

* Put godep-restore with errcheck.

* Remove go1.6 dep.

* Revert master fetch revert.

* Remove -r flag from godep save.

* Set GO15VENDOREXPERIMENT in Dockerfile and remove _worskpace.

* Fix Godep version.
2016-04-18 12:51:36 -07:00
bmw e2e5e05766 Update client package names for integration tests (#1740) 2016-04-15 12:20:56 -07:00
Roland Bracewell Shoemaker 8eaf247ee9 Split CAA checking out to its own service (#1647)
* Split out CAA checking service (minus logging etc)
* Add example.yml config + follow general Boulder style
* Update protobuf package to correct version
* Add grpc client to va
* Add TLS authentication in both directions for CAA client/server
* Remove go lint check
* Add bcodes package listing custom codes for Boulder
* Add very basic (pull-only) gRPC metrics to VA + caa-service
2016-04-12 23:02:41 -07:00
Kane York 25b45a45ec Errcheck errors fixed (#1677)
* Fix all errcheck errors
* Add errcheck to test.sh
* Add a new sa.Rollback method to make handling errors in rollbacks easier.
This also causes a behavior change in the VA. If a HTTP connection is
abruptly closed after serving the headers for a non-200 response, the
reported error will be the read failure instead of the non-200.
2016-04-12 16:54:01 -07:00
Jacob Hoffman-Andrews 0a627dd74b Suppress noise on running unittests.
Remove -v for go install.

Don't print success after every successful command.

Remove `run` in front of `go test` to avoid printing each command.

This reduces the number of log lines taken by successful unittests in Travis by
66%, and makes failures much more visible and easy to read.
2016-04-05 17:35:07 -07:00
Jacob Hoffman-Andrews 7fe78676b6 Improve how we test godep restore. 2016-03-20 17:23:15 -07:00
Roland Bracewell Shoemaker 736376173a Merge branch 'master' into test-linear 2016-02-16 14:41:04 -08:00
Jacob Hoffman-Andrews 8f8e89b571 Add a 'godep restore' test in Travis.
This ensures our godeps match the remote repo.
2016-02-16 12:57:19 -08:00
Jacob Hoffman-Andrews 009ed1c4f5 Run unittests in serial.
Fixes spurious local failures.
2016-02-16 12:57:03 -08:00
Jacob Hoffman-Andrews 33b8c357ef Split out setup.sh from travis-before-install.
This accomplishes two things:
 - setup.sh should now be usable by the client integration test.
 - setup.sh can be used by new project members to simplify first setup.

Update the README to indicate the new file, and to correct some out-of-date
information.
2015-11-30 23:44:45 -08:00
Jacob Hoffman-Andrews 02d5aa5831 Integration test fixes
In https://github.com/letsencrypt/boulder/pull/1110 we put
the activate command in the wrong place so it didn't run if
LETSENCRYPT_PATH was set.

Also remove SIMPLE_HTTP_PORT which is no longer necessary. It was used to keep
the build passing as the client transitioned ports. The client now defaults to
5002.
2015-11-11 13:43:46 -08:00
Jeff Hodges 3df0592b15 move sourcing of activate into test.sh
This gets us closer to allowing the client repo to use
integration-test.py. They have a different path without "venv" in it for
their virtualenv set up.

Updates #1101
2015-11-06 18:11:06 -08:00
Jeff Hodges 0af66a2080 rename amqp-integration-test.py
Make it integration-test.py

Depends on #1102, so please review that first.

Updates #1101 (it's the second step).
2015-11-06 16:31:36 -08:00
Jeff Hodges 62489a6ba9 add skipping of node or letsencrypt integration
Updates #1101
2015-11-06 14:06:07 -08:00
Jeff Hodges e8cd5c1fdd fix integration by changing pip install
The letsencrypt repo renamed its requirements.txt and I'm told we don't
actually need to use it.

Fixes #1105
2015-11-05 21:53:59 -08:00
Jacob Hoffman-Andrews f1103cb094 Fix an erorr in test.sh.
This generates spurious warnings in Travis:

test.sh: line 94: [: x: integer expression expected

And also prevents certain conditions from failing when they should.
2015-10-16 14:06:31 -07:00
Richard Barnes 3a70363366 Selectively hard fail 2015-10-12 20:36:57 -07:00
Richard Barnes 4e98b21fe2 Undo change to cause test failure 2015-10-10 13:08:50 -04:00
Richard Barnes fdae77844c Enable hard-fail and print prettier 2015-10-10 13:07:12 -04:00
Richard Barnes 0d17d030bc Revert down-scoping of test.sh 2015-10-07 10:43:17 -04:00
Richard Barnes 2de8747752 Set threshold back to 0.81 to suppress package name errors 2015-10-07 09:54:30 -04:00
Richard Barnes 5c3d851e99 Remove stray echo line 2015-10-07 09:46:09 -04:00
Richard Barnes 964794d918 Reove wrapper; move failure logic to run_and_comment 2015-10-07 09:42:45 -04:00
Richard Barnes 90484ac460 Add a wrapper that turns non-empty output into non-zero status 2015-10-06 23:12:23 -04:00
bifurcation 90050e91f5 Merge branch 'master' into golint 2015-10-05 19:23:24 -04:00
Jacob Hoffman-Andrews 6e355f8a57 test.sh: upgrade setuptools and pip to latest
Fixes https://github.com/letsencrypt/boulder/issues/921,
an interoperability issue in letsencrypt client tests.
2015-10-05 13:09:43 -07:00
Richard Barnes fd42948605 Upgrade test.sh to catch golint errors 2015-10-05 00:12:24 -04:00
Richard Barnes df87fcd739 Suppress remaining golint output 2015-10-04 21:22:49 -04:00
Jacob Hoffman-Andrews b3aca1ff2b Speed up tests.
Make `make` aware of output files so it doesn't always have to rebuild. Also
make it use `go install`, which is faster than building files individually.

Now that make is faster, use it in startservers.py to consolidate building
logic. This also has the handy side-effect that ./start.py exposes useful build
information through /build, whereas before only the .rpm packaged version did.

Additionally, this allows us to remove `make` from the Travis matrix, since we
are running `make` as part of the integration test. This means each PR only
triggers two Travis builds instead of one, which means we will get results from
Travis faster.

Also, change the Travis matrix logic to be a list of actions to run, rather than
a list of actions to skip. That fixes
https://github.com/letsencrypt/boulder/issues/817.

Enumerate specific sections of test.sh to run, rather than sections to skip.

Note: ./start.py now installs into ./bin/ instead of $GOPATH/bin.

Only set up GitHub secret file (for PR status reporting) when available, and
decrypt it into /tmp rather than $HOME, to avoid accidentally caching it once
Travis' caching features are available.

Clone letsencrypt repo into $HOME instead of $TMP, to make it possible to cache
eventually.

Remove unused `mysql` dependency in Travis.

Override default Travis install command to prevent it from adding
Godeps/_workspace to GOPATH. When that happens, it hides failures that should
arise from importing non-vendorized paths.
2015-10-01 16:28:17 -07:00
Jacob Hoffman-Andrews bc0d98a820 Fix amqp-integration-test.py when run alone.
Previously, test.sh was responsible for running venv/bin/activate, meaning that
`python test/amqp-integration-test.py` would fail to run the letsencrypt client.
Now, so long as LETSENCRYPT_PATH is already set to a valid dir (e.g. in your
.bashrc), `python test/amqp-integration-test.py` should work.
2015-09-23 17:06:14 -07:00
Jacob Hoffman-Andrews 69ddcb784c Add a test that there are no outdated migrations.
If a branch merges with a migration that is timestamped earlier than other
migrations already in master, that migration may get skipped.
2015-09-18 14:53:40 -07:00
Jeff Hodges e22d0eef9a speed up TravisCI by pre-installing test deps
This brings the TravisCI build time down to 4 minutes.

It does so by preventing the TravisCI job from having to build the
shared dependencies of the tests multiple times for each `go test` call.
2015-09-01 17:43:20 -07:00
Jacob Hoffman-Andrews 3afc1bb71a Merge pull request #624 from letsencrypt/mysql_unit
use MariaDB in the unit tests
2015-08-15 01:01:39 -07:00
Jeff Hodges 5e97aa23c6 use MariaDB in the unit tests
And delete the uses of sqlite3
2015-08-14 17:13:15 -07:00
Jeff Hodges 71c2e55f77 add all of cmd/ to test.sh and Makefile
Plus, add to test.sh all future possible packages by using `go list` and
all future possible cmd's to the Makefile with `find`.

Also, fix a bug in external-cert-importer from a bad merge somewhere.
2015-08-14 12:21:44 -07:00