Граф коммитов

20 Коммитов

Автор SHA1 Сообщение Дата
deepthi 4a410e80f7 run govendor/bootstrap.sh on docker image as needed
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-02-07 20:59:54 -08:00
deepthi 2b0379112e run bootstrap.sh on docker image if either vendor.json or bootstrap.sh has changed
Signed-off-by: deepthi <deepthi@planetscale.com>
2019-02-07 18:59:19 -08:00
DK 4db4a28a93 Update all the protocol buffers with the new compiler
Signed-off-by: DK <dk@planetscale.com>
2018-12-03 15:04:01 -08:00
DK 0f25ad165b Forcing the docker unit tests builds to run with the user vitess
The unit tests expect the user to be vitess, however that has a
negative impact on our ability to build the software inside the
containers. This specifically requires the user to be vitess for
testing

Signed-off-by: DK <dk@planetscale.com>
2018-10-26 20:42:51 -07:00
Michael Berlin 4a12f37f5b test: Fix broken vtctld_web_test when executed within Docker (and not on Travis).
This test was broken on newer Docker versions. According to https://serverfault.com/questions/824809/chrome-under-docker-cap-sys-admin-vs-privileged probably since Docker 1.12.

Note that Travis CI uses a different mechanism to run this test and
therefore the test always passed there.

However, project maintainers who followed
https://github.com/vitessio/vitess/tree/master/docker/bootstrap#for-vitess-project-maintainers
to update (and test!) the bootstrap images should have seen this error.

Note that I have extended test/environment.py. It now configures
webdriver to let chromedriver always log everything. If Chrome does not
start, the test will print the chromedriver log file. This is how I
found out why Chrome did not come up.

Also note that I saw some flaky test invocations. I hope that turning on
the logging in chromedriver does not result into timing issues and more
flaky tests. If so, we should consider to fix the tests and make them
more robust.

Signed-off-by: Michael Berlin <mberlin@google.com>
2018-04-08 16:17:56 -07:00
Anthony Yeh 147770fd81
Update scripts for new directory structure. 2018-02-27 12:39:30 -08:00
Sugu Sougoumarane 7de8ffd45e php: drop php client
Issue #3230
Now that we support mysql protocol, there's no need to support
a custom PHP client any more.
2017-12-05 19:37:09 -08:00
Michael Berlin b03e58741c travis: Run tests within our "mysql57" bootstrap Docker image instead of natively.
This will fix the recent test failures and undo the change from https://github.com/youtube/vitess/issues/3203 where we had to disable the tests "unit" and "mysql_server" because they were constantly failing. With this change, the two tests are enabled again.

More importantly, with this change we no longer have to maintain Vitess' dependencies in the Travis CI environment.

Instead, we'll depend on our "bootstrap" Docker images to run the test.

Note that I had to come up with a caching mechanism for "make build". By default, we provide the test within the Docker container with a clean copy of the Git repository and run "make build" before *each* test i.e. a Travis build with 10 tests in it would have run "make build" 10 times. To avoid this, I added a new option "-use_docker_cache" to test.go which will run "make build" before all tests and use "docker commit" to create a new temporary cache image.

Overall, this change has several consequences:

- Travis CI builds will be dependent on an up to date Docker image. For example, if somebody adds a dependency to vendor/vendor.json and forgets to rebuild and push the used Docker image, "make build" will fail. I'll add a test for this in a separate commit.

- We'll use MySQL 5.7 (instead of MariaDB) for the Travis test runs.

- We can no longer use Travis container infrastructure and have to use the VM infrastructure instead. That means an additional 20 seconds wait time until Travis has started a VM and runs the build.

- More overhead per Travis build because we need to pull the Docker image first (takes up to two minutes). Before, we used Travis' caching mechanism to cache dependencies between builds.

- Slightly slower tests because the VM infrastructure has less resources than the container one (~2 CPUs (bursted) instead of 2 CPUs, see https://docs.travis-ci.com/user/reference/overview/).

- The ".git" directory will be copied into the Docker image as well now because travis/check_make_proto.sh needs it. I'll create a separate commit to integrate this.
2017-09-20 17:58:04 -07:00
Sugu Sougoumarane 7af23e1dde license: BSD->Apache v2.0
Please refer to #2694 and #2670 for motivation and reasoning for
this change.

I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.

I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.

As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
2017-05-06 00:38:56 -07:00
Bryan Beaudreault d03b00d516 docker/test/run: Avoid using non-universal --tmpdir flag on mktemp (#2429)
* fallback to not using --tmpdir if initial mktemp fails

* simplify
2017-01-03 12:55:41 -08:00
Michael Berlin 51006207ba docker: Always set USER environment variable to "vitess".
Fixes problems when the wrapper script docker/test/run.sh is not used.

Reported here: https://github.com/youtube/vitess/issues/1721
2016-05-25 17:38:58 -07:00
Anthony Yeh 18bb48fb44 docker/test/run.sh: Also preserve new Go vendor directory. 2016-04-15 13:41:29 -07:00
Anthony Yeh d40e396f05 test.go: Preserve php/vendor dir from bootstrap image.
Otherwise, the php test would only work if you had also done the
"composer install" step in your local directory, outside Docker.
2015-11-04 18:48:34 -08:00
Anthony Yeh c5a3db11f5 test.go: Explicitly remove cleanup docker container.
Rather than relying on --rm, because that flag doesn't always work.
2015-08-24 15:40:54 -07:00
Anthony Yeh eb5141992f Add Java tests to Docker test runner. 2015-08-12 01:56:37 -07:00
Michael Berlin a8785556be docker/test/run.sh: Make repo world readable for access from docker.
Previously, the permissions of all items *within* the repository were already updated, but not the repository itself.

This resulted into the error 'cp: cannot stat `/tmp/src/*': Permission denied' when running "docker/test/run.sh mariadb".
2015-05-19 17:43:18 -07:00
Anthony Yeh a58cde4f3b Clean up mounted VTDATAROOT from inside Docker.
Otherwise, you may get permission denied when trying to remove the temp
dir as a normal user, because the files were created by the 'vitess'
user inside Docker.
2015-04-22 15:06:07 -07:00
Anthony Yeh b14c3a308f Add test-runner script for integration tests in Docker.
This is an alternative to 'make integration_test',
with the following advantages:

* Tests run in Docker, so no bootstrap is necessary.
* Tests are hermetic and can run in parallel.
* Test against different flavors just by setting a flag.
* Failing tests are retried to see if they are flaky.
* A failed test will be recorded for later inspection, while the script
  continues to run other tests.
* A test that takes too long will be considered stuck and retried.

There's plenty of room for improvement, but now that we have something
in a more readable language than Makefile, we can iterate.
2015-04-21 20:12:20 -07:00
Anthony Yeh 9a885e51c4 Fix permission issues when running tests in Docker.
The vtdataroot volume needs to be created after the directory itself,
and other fixes.
2015-04-20 17:11:45 -07:00
Anthony Yeh 3a8ec3799a Add Makefile rule to run tests inside Docker.
This will let contributors test changes without having to do bootstrap
at all.

It also makes it easy to test against multiple flavors without having to
swap out installed packages. You can even run tests against multiple
flavors simultaneously without interfering, if you have enough RAM.
2015-04-20 16:03:01 -07:00