Commit Graph

32 Commits

Author SHA1 Message Date
Michael Schurter c0eff81383 Fix Service.AddressMode changes during task updates 2017-06-21 17:19:08 -07:00
Michael Schurter 67d154a274 Test driver network advertisement and checks 2017-06-21 17:19:08 -07:00
Michael Schurter f286b6b798 Build new env from new alloc before interpolating 2017-05-04 15:06:15 -07:00
Michael Schurter 83f9591d75 Thanks go vet! 2017-04-19 13:05:41 -07:00
Michael Schurter c8d3e869c6 Unregister from Consul when waiting for restart 2017-04-19 12:42:48 -07:00
Michael Schurter a3fc157233 Fix circular test imports 2017-04-19 12:42:47 -07:00
Michael Schurter e204a287ed 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
Diptanu Choudhury 54a5e795a5 Hooking up the executor in all drivers 2016-03-23 13:19:45 -07:00
Abhishek Chanda 34d3deff9b Run a bunch of tests in parallel 2016-02-21 19:42:03 -08:00
Diptanu Choudhury 2eb03e1d23 Renamed serviceId to serviceID 2015-12-14 15:57:56 -08:00
Diptanu Choudhury 6b6d74e2eb Fixed tests 2015-12-14 15:47:01 -08:00
Diptanu Choudhury 0c4b76e0ef Changing the prefix of the service 2015-12-14 11:14:22 -08:00
Diptanu Choudhury f932c5f9df Refactored test and added some comments 2015-12-11 14:14:04 -08:00
Diptanu Choudhury 1b942c158d Removing extra lines 2015-12-11 14:06:51 -08:00
Diptanu Choudhury c7c0748cea Making a struct to hold consul service config 2015-12-11 14:06:51 -08:00
Diptanu Choudhury d9fc07fb08 Added a test for the filtering logic of service and clients 2015-12-11 14:06:51 -08:00
Diptanu Choudhury a53e035b49 Deregister services and checks which are managed by Nomad 2015-12-11 14:06:51 -08:00
Diptanu Choudhury d54ccfb0ec Muted the consul debug messages 2015-12-11 09:06:03 -08:00
Diptanu Choudhury 86a45b5b39 Added a mock consul api client 2015-11-26 01:03:16 -08:00
Diptanu Choudhury 01ca982f92 Added a test for modifying check 2015-11-25 18:37:51 -08:00
Diptanu Choudhury db8c4170b3 Fixed merge conflicts 2015-11-25 18:32:37 -08:00
Diptanu Choudhury 5eb8a26376 Fixed tests 2015-11-25 18:23:47 -08:00
Diptanu Choudhury 3f82deff60 Added options for adding more consul configuration 2015-11-25 13:39:16 -08:00
Diptanu Choudhury 95942b4179 Improved tests 2015-11-25 12:06:14 -08:00
Diptanu Choudhury 576a6f402e Added a test to make sure we are adding a check to a service 2015-11-25 11:20:36 -08:00
Diptanu Choudhury f72027277d Dried the tests 2015-11-24 17:33:04 -08:00
Diptanu Choudhury 2c0822284b Tracking the tasks too 2015-11-24 17:26:30 -08:00
Diptanu Choudhury 919f763ca8 Added a test to re-sync services 2015-11-24 14:37:14 -08:00
Diptanu Choudhury 135006699b Renamed consul client to service 2015-11-24 12:34:26 -08:00
Diptanu Choudhury f525d86958 Added a test to ensure invalid services are not registered 2015-11-18 17:29:12 -08:00
Diptanu Choudhury 9592fd3912 Added a check for accpeting protocol information in consul check 2015-11-18 14:29:55 -08:00
Diptanu Choudhury 5608531143 Added a test to check check creation 2015-11-18 14:29:55 -08:00