consul/command
Frank Schroeder 831d84c940 build: make tests independent of build tags
When the metadata server is scanning the agents for potential servers
it is parsing the version number which the agent provided when it
joined. This version number has to conform to a certain format, i.e.
'n.n.n'. Without this version number properly set some tests fail with
error messages that disguise the root cause.

The default version number is currently set to 'unknown' in
version/version.go which does not parse and triggers the tests to fail.
The work around is to use a build tag 'consul' which will use the
version number set in version_base.go instead which has the correct
format and is set to the current release version.

In addition, some parts of the code also require the version number to
be of a certain value. Setting it to '0.0.0' for example makes some
tests pass and others fail since they don't pass the semantic check.

When using go build/install/test one has to remember to use '-tags
consul' or tests will fail with non-obvious error messages.

Using build tags makes the build process more complex and error prone
since it prevents the use of the plain go toolchain and - at least in
its current form - introduces subtle build and test issues. We should
try to eliminate build tags for anything else but platform specific
code.

This patch removes all references to specific version numbers in the
code and tests and sets the default version to '9.9.9' which is
syntactically correct and passes the semantic check. This solves the
issue of running go build/install/test without tags for the OSS build.
2017-08-30 13:40:18 +02:00
..
agent.go agent: honor deprecated flags for retry-join-{ec2,azure,gce} (#3384) 2017-08-09 16:18:30 -07:00
agent_test.go Moved handling advertise address to readConfig and out of the agent's constructor, plus unit test fixes 2017-07-27 22:06:31 -05:00
base.go Moves config util helpers into their own package. (#3165) 2017-06-20 10:49:37 -07:00
catalog_command.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
catalog_command_test.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
catalog_list_datacenters.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
catalog_list_datacenters_test.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
catalog_list_nodes.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
catalog_list_nodes_test.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
catalog_list_services.go Sort tags so output is deterministic. 2017-07-14 17:00:08 -07:00
catalog_list_services_test.go Sort tags so output is deterministic. 2017-07-14 17:00:08 -07:00
commands.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
configtest.go Moves flag slice helper into configutil. 2017-06-20 12:52:35 -07:00
configtest_test.go pkg refactor 2017-06-10 18:52:45 +02:00
event.go pkg refactor 2017-06-10 18:52:45 +02:00
event_test.go pkg refactor 2017-06-10 18:52:45 +02:00
exec.go pkg refactor 2017-06-10 18:52:45 +02:00
exec_test.go command: make TestExecCommandRun_CrossDC more resilient 2017-07-07 09:22:34 +02:00
force_leave.go pkg refactor 2017-06-10 18:52:45 +02:00
force_leave_test.go pkg refactor 2017-06-10 18:52:45 +02:00
info.go pkg refactor 2017-06-10 18:52:45 +02:00
info_test.go pkg refactor 2017-06-10 18:52:45 +02:00
join.go pkg refactor 2017-06-10 18:52:45 +02:00
join_test.go pkg refactor 2017-06-10 18:52:45 +02:00
keygen.go pkg refactor 2017-06-10 18:52:45 +02:00
keygen_test.go pkg refactor 2017-06-10 18:52:45 +02:00
keyring.go pkg refactor 2017-06-10 18:52:45 +02:00
keyring_test.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_command.go Add catalog CLI functions (#3204) 2017-07-14 12:45:08 -07:00
kv_command_test.go test: run command tests in parallel 2017-05-31 00:29:25 +02:00
kv_delete.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_delete_test.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_export.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_export_test.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_get.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_get_test.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_import.go fix command/kv_import.go help text (#3387) 2017-08-10 09:17:37 +02:00
kv_import_test.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_put.go pkg refactor 2017-06-10 18:52:45 +02:00
kv_put_test.go pkg refactor 2017-06-10 18:52:45 +02:00
leave.go pkg refactor 2017-06-10 18:52:45 +02:00
leave_test.go pkg refactor 2017-06-10 18:52:45 +02:00
lock.go command/lock: Add -child-exitcode, return 2 on child error (#3329) 2017-07-26 22:09:19 -07:00
lock_test.go command/lock: Add -child-exitcode, return 2 on child error (#3329) 2017-07-26 22:09:19 -07:00
maint.go pkg refactor 2017-06-10 18:52:45 +02:00
maint_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
members.go pkg refactor 2017-06-10 18:52:45 +02:00
members_test.go pkg refactor 2017-06-10 18:52:45 +02:00
monitor.go pkg refactor 2017-06-10 18:52:45 +02:00
operator.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_autopilot.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_autopilot_get.go Add UpgradeVersionTag to autopilot get/set commands 2017-07-18 14:01:04 -07:00
operator_autopilot_get_test.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_autopilot_set.go Add UpgradeVersionTag to autopilot get/set commands 2017-07-18 14:01:04 -07:00
operator_autopilot_set_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
operator_autopilot_test.go test: run command tests in parallel 2017-05-31 00:29:25 +02:00
operator_raft.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_raft_list.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_raft_list_test.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_raft_remove.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_raft_remove_test.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_raft_test.go pkg refactor 2017-06-10 18:52:45 +02:00
operator_test.go test: run command tests in parallel 2017-05-31 00:29:25 +02:00
reload.go pkg refactor 2017-06-10 18:52:45 +02:00
reload_test.go pkg refactor 2017-06-10 18:52:45 +02:00
rtt.go pkg refactor 2017-06-10 18:52:45 +02:00
rtt_test.go agent: move agent/consul/structs to agent/structs 2017-08-09 14:32:12 +02:00
snapshot_command.go golint: Rename fields and structs 2017-04-25 09:26:13 -07:00
snapshot_command_test.go test: run command tests in parallel 2017-05-31 00:29:25 +02:00
snapshot_inspect.go pkg refactor 2017-06-10 18:52:45 +02:00
snapshot_inspect_test.go pkg refactor 2017-06-10 18:52:45 +02:00
snapshot_restore.go pkg refactor 2017-06-10 18:52:45 +02:00
snapshot_restore_test.go pkg refactor 2017-06-10 18:52:45 +02:00
snapshot_save.go pkg refactor 2017-06-10 18:52:45 +02:00
snapshot_save_test.go pkg refactor 2017-06-10 18:52:45 +02:00
util_test.go build: make tests independent of build tags 2017-08-30 13:40:18 +02:00
util_unix.go command: fix Windows build 2015-01-25 05:00:52 +01:00
util_windows.go docs: describe child process handling on Windows for lock command 2015-01-25 11:42:29 +01:00
validate.go Moves flag slice helper into configutil. 2017-06-20 12:52:35 -07:00
validate_test.go pkg refactor 2017-06-10 18:52:45 +02:00
version.go pkg refactor 2017-06-10 18:52:45 +02:00
version_test.go test: run command tests in parallel 2017-05-31 00:29:25 +02:00
watch.go pkg refactor 2017-06-10 18:52:45 +02:00
watch_test.go pkg refactor 2017-06-10 18:52:45 +02:00