Commit Graph

46 Commits

Author SHA1 Message Date
Michael Schurter de7dbf5ff9 Fix java tests 2017-01-20 14:12:30 -08:00
Michael Schurter 295c2bf74a Merge pull request #2186 from hashicorp/f-driver-cleanup
Add Cleanup method to Driver interface
2017-01-20 13:02:14 -08:00
Alex Dadgar 78deb8b292 Support setting class_path and class name.
This PR enhances the java driver to allow setting the class path and
class name to run. It also fixes an issue that would make the Java
driver attempt to chroot regardless of operating system (this never
effected a released version of Nomad).
2017-01-13 16:03:11 -08:00
Michael Schurter 4d081490e6 Add Cleanup method to Driver interface
Cleanup can be used for cleaning up resources created by drivers to run
a task. Initially the Docker driver is the only user (to remove
downloaded images).
2017-01-11 17:23:33 -08:00
Michael Schurter 3ea09ba16a Move chroot building into TaskRunner
* Refactor AllocDir to have a TaskDir struct per task.
* Drivers expose filesystem isolation preference
* Fix lxc mounting of `secrets/`
2017-01-05 16:31:49 -08:00
Michael Schurter 770ed703d0 Add Driver.Prestart method
The Driver.Prestart method currently does very little but lays the
foundation for where lifecycle plugins can interleave execution _after_
task environment setup but _before_ the task starts.

Currently Prestart does two things:

* Any driver specific task environment building
* Download Docker images

This change also attaches a TaskEvent emitter to Drivers, so they can
emit events during task initialization.
2016-12-02 11:03:48 -08:00
Alex Dadgar 00a1234c55 Executor + Java/Raw Exec/Exec 2016-10-10 11:47:04 -07:00
Alex Dadgar eef786dd9d Secret dir materialized in alloc/task directory 2016-09-02 12:44:05 -07:00
Diptanu Choudhury 9309247f9d Fixed a java test 2016-08-23 16:51:09 -05:00
Diptanu Choudhury dd7e69006e Not running tests parallal 2016-08-11 21:53:27 -07:00
Sean Chittenden 2983bd6fce
Fix test for non-Linux platforms.
The following tests now check a whitelist for whether or not their
driver is present or not, or if the OS is supported or not.

* `TestAllocDir_MountSharedAlloc`
* `TestClient_Drivers_InWhitelist` (`exec` driver)
* `TestClient_Drivers` (`exec` driver)
* `TestJavaDriver_Fingerprint` (`java` driver)
2016-07-10 15:19:49 -07:00
Miquel Sabaté Solà f76f5c960f client/driver: added more tests
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
2016-03-24 08:47:23 +01:00
Alex Dadgar ab44bc78a2 Get tests to pass 2016-03-15 13:28:57 -07:00
Diptanu Choudhury 7891737fa8 Fixed some java tests 2016-02-24 23:54:01 -08:00
Diptanu Choudhury 5180480787 Fixed the fingerprinter test 2016-02-18 11:34:17 -08:00
Diptanu Choudhury 502d56b232 Enabling cgroups and chroot on linux 2016-02-18 09:49:11 -08:00
Alex Dadgar 48bc77bc7f fix java test 2016-02-17 10:04:19 -08:00
Diptanu Choudhury 49099f4c70 Fixed more tests 2016-02-10 13:54:54 -08:00
Diptanu Choudhury 94a51a6a1b Fixing the id generation logic for the java and qemu drivers 2016-02-04 17:00:40 -08:00
Alex Dadgar a3c22258cd Use TestMultiplier on all waits 2016-01-21 15:24:24 -08:00
Alex Dadgar 1ceb6f012a Fix a bunch of tests
Up timeouts

trusty travis beta

Increase timeouts
2016-01-20 16:03:53 -08:00
Alex Dadgar 6d157a0337 Fix tests 2016-01-11 09:58:31 -08:00
Chris Hines 37745f66c9 Speed up tests by allowing parallel execution. 2015-11-25 15:56:55 -05:00
Alex Dadgar 4d817f5cbc Revert "Revert "Make drivers take arguments as a list and not as a string"" 2015-11-18 15:16:42 -08:00
Alex Dadgar 0e51375285 Revert "Make drivers take arguments as a list and not as a string" 2015-11-18 13:46:43 -08:00
Alex Dadgar 5a678548fa Rebase 2015-11-18 12:30:35 -08:00
Chris Bednarski 9f40143684 Merge branch 'master' into f-port-labels 2015-11-16 16:02:38 -08:00
Alex Dadgar 82f51601db Track Task State in the client and capture Wait results 2015-11-16 15:14:21 -08:00
Diptanu Choudhury 0673b832fb Fixed compilation issues with driver tests 2015-11-16 13:10:57 -08:00
Alex Dadgar 787164044d Enable Open tests for Exec/Java 2015-11-10 16:59:52 -08:00
Clint Shryock fb8066d8f3 add checksums to tests, formatting after rebase 2015-11-05 09:23:45 -06:00
Clint Shryock 145a2e3610 refactor drivers to use new getter 2015-11-05 08:55:30 -06:00
Alex Dadgar d83777f198 Make a basic executor that can be shared and fix some fingerprinting/tests 2015-11-03 12:47:48 -08:00
Alex Dadgar 271702f4a2 Small improvements 2015-11-03 10:50:30 -08:00
Abhishek Chanda 9e541450c2 Actually append jvm opts to the CLI
- Also adds a test
2015-10-16 22:45:16 +00:00
Chris Bednarski 88bb01ab6f Fingerprint test should now behave correctly when the executor is not installed; fix some go vet issues 2015-10-06 16:33:02 -07:00
Chris Bednarski a8c8fc2f96 Merge branch 'master' into b-docker-fixes
Conflicts:
	client/driver/docker_test.go
	client/driver/java_test.go
	client/driver/qemu_test.go
2015-09-25 18:35:23 -07:00
Alex Dadgar 70a1a37f84 Small test cleanup 2015-09-25 17:55:29 -07:00
Chris Bednarski 32d260281f Added guards to tests so we can more gracefully degrade the test suite when thing are not installed 2015-09-25 16:49:26 -07:00
Chris Bednarski b9dd4c40c5 Added basic resources to exec/java tests so each test has cpu, ram, and network 2015-09-25 16:49:18 -07:00
Alex Dadgar 3cea4288b9 Merge qemu test 2015-09-25 16:49:14 -07:00
Chris Bednarski cc4d361ee9 Updated Qemu and tests to use DriverContext 2015-09-09 18:38:52 -07:00
Chris Bednarski 4eb8fc5188 Added config to drivers; needed for docker driver to get the socket endpoint 2015-09-08 12:43:02 -07:00
Clint Shryock 1dd0b63cb4 clean up orphaned java processes 2015-09-03 09:49:39 -05:00
Clint Shryock c774c67b6b driver/java: update Fingerprint for Java driver 2015-09-02 11:41:25 -05:00
Clint Shryock 9d5c04ddbb Spike at a Java driver, runs Java jars 2015-09-01 17:07:41 -05:00