Commit Graph

52 Commits

Author SHA1 Message Date
Chelsea Holland Komlo
ba2ebbc7f9 code review fixup 2018-01-31 18:34:03 -05:00
Chelsea Holland Komlo
a9447addd3 add applicable boolean to fingerprint response
public fields and remove getter functions
2018-01-31 13:21:45 -05:00
Chelsea Holland Komlo
f5fc20a564 create safe getters and setters for fingerprint response 2018-01-26 11:22:05 -05:00
Chelsea Holland Komlo
5e8151d700 refactor Fingerprint to request/response construct 2018-01-24 11:54:02 -05:00
Alex Dadgar
366e91276f fix two flaky tests 2017-10-23 18:15:52 -07:00
Alex Dadgar
651159077b Run as user on mac 2017-10-19 16:49:57 -07:00
Alex Dadgar
22c5999c09 darwin test fixes 2017-07-22 19:48:47 -07:00
Alex Dadgar
789a5072a9 Parallel 2017-07-21 12:06:39 -07:00
Michael Schurter
8a7df57227 Test driver network advertisement and checks 2017-06-21 17:19:08 -07:00
Michael Schurter
db8aabe1c3 Fix circular test imports 2017-04-19 12:42:47 -07:00
Michael Schurter
10cb924b2c Refactor Consul Syncer into new ServiceClient
Fixes #2478 #2474 #1995 #2294

The new client only handles agent and task service advertisement. Server
discovery is mostly unchanged.

The Nomad client agent now handles all Consul operations instead of the
executor handling task related operations. When upgrading from an
earlier version of Nomad existing executors will be told to deregister
from Consul so that the Nomad agent can re-register the task's services
and checks.

Drivers - other than qemu - now support an Exec method for executing
abritrary commands in a task's environment. This is used to implement
script checks.

Interfaces are used extensively to avoid interacting with Consul in
tests that don't assert any Consul related behavior.
2017-04-19 12:42:47 -07:00
Alex Dadgar
1dbd63ad2a Split driver tests 2017-04-04 15:12:14 -07:00
Alex Dadgar
07f7e19578 Fix vet script and fix vet problems
This PR fixes our vet script and fixes all the missed vet changes.

It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Michael Schurter
33c015bcc7 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
de7351b959 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
ee17940dfe 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
0b65a5f95d Executor + Java/Raw Exec/Exec 2016-10-10 11:47:04 -07:00
Alex Dadgar
4bae54741e Secret dir materialized in alloc/task directory 2016-09-02 12:44:05 -07:00
Diptanu Choudhury
25f60ed10b Fixed the raw_exec fingerprint test 2016-08-24 13:38:43 -05:00
Diptanu Choudhury
938d512f49 Not running tests parallal 2016-08-11 21:53:27 -07:00
Miquel Sabaté Solà
b41608df51 client/driver: added more tests
Signed-off-by: Miquel Sabaté Solà <msabate@suse.com>
2016-03-24 08:47:23 +01:00
Alex Dadgar
4c1be8e637 Get tests to pass 2016-03-15 13:28:57 -07:00
Alex Dadgar
4afa44c15e driver.test: remove redundant tests 2016-02-23 14:41:52 -08:00
Diptanu Choudhury
d94c28b39c Fixed more tests 2016-02-10 13:54:54 -08:00
Diptanu Choudhury
30d6688e75 Removed unused imports in test 2016-02-09 12:31:14 -08:00
Diptanu Choudhury
c8ac49bc91 Removing the killing executor pid tests 2016-02-09 11:29:02 -08:00
Diptanu Choudhury
a97181157c Killing the userpid if the plugin is killed while the client is running 2016-02-09 10:17:33 -08:00
Alex Dadgar
e696c7eef7 Fix timeouts between signal and kill 2016-02-08 19:31:57 -08:00
Diptanu Choudhury
49226c4a9c Fixing merge conflicts 2016-02-04 22:55:38 -08:00
Alex Dadgar
0c46a0ec1d Fix tests 2016-02-04 17:27:58 -08:00
Diptanu Choudhury
d7a03de368 Fixed the raw_exec_driver tests 2016-02-04 17:00:40 -08:00
Alex Dadgar
ca69bcd18b Extract artifacts to the root of the task, not in the local directory 2016-02-04 15:18:22 -08:00
Alex Dadgar
e0c23ec2cd Use TestMultiplier on all waits 2016-01-21 15:24:24 -08:00
Alex Dadgar
417c70c10c ordering issue 2016-01-21 13:28:48 -08:00
Alex Dadgar
50d5fb7db6 Bump again 2016-01-21 12:55:35 -08:00
Alex Dadgar
85a2c05697 Time Duration fixes 2016-01-21 12:29:13 -08:00
Alex Dadgar
e91abac0f6 Fix a bunch of tests
Up timeouts

trusty travis beta

Increase timeouts
2016-01-20 16:03:53 -08:00
Alex Dadgar
dccbc0320b Fix tests 2016-01-11 09:58:31 -08:00
Chris Hines
ffda9d71d4 Speed up tests by allowing parallel execution. 2015-11-25 15:56:55 -05:00
Chris Hines
d707adc3ed Use package testtask and httptest.Server to make client/driver tests OS independent. 2015-11-25 15:56:20 -05:00
Alex Dadgar
7357979089 Revert "Revert "Make drivers take arguments as a list and not as a string"" 2015-11-18 15:16:42 -08:00
Alex Dadgar
d666f5bde1 Revert "Make drivers take arguments as a list and not as a string" 2015-11-18 13:46:43 -08:00
Alex Dadgar
62a0c5d14c Rebase 2015-11-18 12:30:35 -08:00
Alex Dadgar
ee1887e609 Rebase 2015-11-18 12:29:04 -08:00
Chris Bednarski
1d1e4bdd08 Merge branch 'master' into f-port-labels 2015-11-16 16:02:38 -08:00
Alex Dadgar
f4b461f97a Track Task State in the client and capture Wait results 2015-11-16 15:14:21 -08:00
Diptanu Choudhury
0d69778873 Fixed compilation issues with driver tests 2015-11-16 13:10:57 -08:00
Alex Dadgar
e49f3383b6 merge 2015-11-06 10:42:49 -08:00
Clint Shryock
0fe2ea9b04 add checksums to tests, formatting after rebase 2015-11-05 09:23:45 -06:00
Clint Shryock
1e07daa680 drivers: Add/Use go-getter to fetch remote binaries
Updates Qemu, Java drivers to use go-getter to fetch binaries
Adds remote artifact support for Exec, Raw Exec drivers
2015-10-26 09:40:06 -05:00