Commit Graph

125 Commits

Author SHA1 Message Date
Chelsea Holland Komlo
115d54cb19 fix up health check logic comparison; add node events to client driver checks 2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
8a0ed4e5ff improve tests 2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
865b7e0ace fix up racy tests 2018-03-21 15:15:26 -04:00
Chelsea Holland Komlo
1570972cb3 add concept of health checks to fingerprinters and nodes
fix up feedback from code review

add driver info for all drivers to node
2018-03-21 15:15:25 -04:00
Chelsea Holland Komlo
29696110b2 add network resources equal method, use time ticker
remove impossible test case
2018-02-27 12:42:53 -05:00
Chelsea Holland Komlo
cd5be3bea9 improved testing; node networks comparison 2018-02-26 15:55:38 -05:00
Chelsea Holland Komlo
4271123b4f code review fixups 2018-02-26 12:36:30 -05:00
Chelsea Holland Komlo
7246c9d1ff edge trigger node update
test update config copy trigger
2018-02-26 12:36:04 -05:00
Alex Dadgar
efa8bc0615 Fix original client server list behavior 2018-02-15 16:04:53 -08:00
Alex Dadgar
e2d1ce8ff2 Fix manager tests and make testagent recover from port conflicts 2018-02-15 13:59:01 -08:00
Alex Dadgar
b97b44a76f use server manager 2018-02-15 13:59:01 -08:00
Alex Dadgar
a6baf7133a Remove testing 2018-02-15 13:59:01 -08:00
Alex Dadgar
d15bb76538 Refactor 2018-02-15 13:59:00 -08:00
Alex Dadgar
1611fe56e3 Add testing interfaces 2018-02-15 13:59:00 -08:00
Alex Dadgar
ddee97ca29 Stats Endpoint 2018-02-15 13:59:00 -08:00
Chelsea Holland Komlo
12ee25d852 extract test helper
lock concurrent accesses to node

comment exported method
2018-02-12 18:30:10 -05:00
Chelsea Holland Komlo
1a26950114 code review feedback 2018-02-07 18:10:55 -05:00
Chelsea Holland Komlo
15cb7683f8 fix up linting 2018-02-01 12:26:38 -05:00
Chelsea Holland Komlo
ba2ebbc7f9 code review fixup 2018-01-31 18:34:03 -05:00
Chelsea Holland Komlo
ae889b4fba remove attributes from periodic fingerprints when state changes
write test for client periodic fingerprinters
2018-01-29 13:48:54 -05:00
Chelsea Holland Komlo
bbc56860ac adding additional test assertions; differentiate reloading agent and http server 2018-01-16 07:34:39 -05:00
Chelsea Holland Komlo
11089b23ce reload raft transport layer
fix up linting
2018-01-08 14:52:28 -05:00
Chelsea Holland Komlo
c70702e802 call reload on agent, client, and server separately 2018-01-08 09:56:31 -05:00
Chelsea Holland Komlo
b1f87727dd fix up downgrading client to plaintext
add locks around changing server configuration
2018-01-08 09:21:06 -05:00
Chelsea Holland Komlo
7b749579a2 add ability to upgrade/downgrade nomad agents tls configurations via sighup 2018-01-08 09:21:06 -05:00
Michael Schurter
9c1e595e2e Fix GC'd alloc tracking
The Client.allocs map now contains all AllocRunners again, not just
un-GC'd AllocRunners. Client.allocs is only pruned when the server GCs
allocs.

Also stops logging "marked for GC" twice.
2017-11-01 15:16:38 -05:00
Alex Dadgar
af7e1413a5 fix test 2017-10-30 12:35:31 -07:00
Alex Dadgar
8accabcd87 move to consul freeport implementation 2017-10-23 16:51:40 -07:00
Alex Dadgar
e1b1465081 Standardize retrieving a free port into a helper package 2017-10-23 16:48:20 -07:00
Michael Schurter
f6f8c3dafd Test fixes from #3383 2017-10-13 15:45:35 -07:00
Chelsea Holland Komlo
38f8217ea0 add tests for functionality 2017-10-11 17:09:20 -07:00
Michael Schurter
04b8f8e7fc Remove structs import from api
Goes a step further and removes structs import from api's tests as well
by moving GenerateUUID to its own package.
2017-09-29 10:36:08 -07:00
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Armon Dadgar
3fc9dce13b Address @dadgar feedback 2017-09-11 10:30:59 -07:00
Chelsea Holland Komlo
ef4aef0223 fix up travis test failure via race condition 2017-09-05 15:04:59 +00:00
Chelsea Holland Komlo
681a3f337a fixups from code review 2017-09-05 14:13:34 +00:00
Chelsea Holland Komlo
3c0710074c labels depend on full setup of client beforehand 2017-09-05 14:13:34 +00:00
Armon Dadgar
33f640dc38 client: fixing policy resolution after ACL endpoint enforcement 2017-09-04 13:05:53 -07:00
Michael Schurter
85b9dd9cce Move migrating state into prevAllocWatcher 2017-08-14 16:02:28 -07:00
Michael Schurter
8253439de2 Update tests for new blocking/migrating code 2017-08-11 16:21:57 -07:00
Alex Dadgar
08c2ba9bc6 Parallel client tests (#2890)
* alloc_runner

* Random tests

* parallel task_runner and no exec compatible check

* Parallel client

* Fail fast and use random ports

* Fix docker port mapping

* Make concurrent pull less timing dependant

* up parallel

* Fixes

* don't build chroots in parallel on travis

* Reduce parallelism on travis with lxc/rkt

* make java test app not run forever

* drop parallelism a little

* use docker ports that are out of the os's ephemeral port range

* Limit even more on travis

* rkt deadline
2017-07-22 19:04:36 -07:00
Mark Mickan
e418b3e468 Add tests for migrating symlinks in alloc and local directories 2017-06-04 15:56:22 +09:30
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
Michael Schurter
df30a110fb Create AssertUntil helper func 2017-04-06 17:05:09 -07:00
Michael Schurter
985bde83d6 Improve test timings
1234ms was far longer than needed and not sleeping between iterations
was just mean.
2017-04-06 11:10:36 -07:00
Michael Schurter
11206c7c3e Require TLS for server RPC when enabled
Fixes #2525

We used to be checking a RequireTLS field that was never set. Instead we
can just check the TLSConfig.EnableRPC field and require TLS if it's
enabled.

Added a few unfortunately slow integration tests to assert the intended
behavior of misconfigured RPC TLS.

Also disable a lot of noisy test logging when -v isn't specified.
2017-04-06 09:34:36 -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
Alex Dadgar
6effacbf12 Docs 2017-02-17 10:16:15 -08:00
Alex Dadgar
43ab32f96c Tests compile 2017-02-07 21:30:57 -08:00
Alex Dadgar
8573ab9db0 fix test build 2017-01-23 11:26:34 -08:00