OpenSearch/qa
William Brafford ff7fd9b9e2
Pass COMPUTERNAME env var to elasticsearch.bat (#45763)
* Pass COMPUTERNAME env var to elasticsearch.bat

When we run bin/elasticsearch with bash, we get a $HOSTNAME builtin that
contains the hostname of the machine the script is running on. When
there's no provided nodename, Elasticsearch uses the HOSTNAME to create
a nodename. On Windows, Powershell provides a $COMPUTERNAME variable for
the same purpose. CMD.EXE provides the same thing, except it's called
%COMPUTERNAME%. bin/elasticsearch.bat sets $HOSTNAME to the value of
$COMPUTERNAME. However, when testclusters invokes bin/elasticsearch.bat,
the COMPUTERNAME variable doesn't get passed in, leaving HOSTNAME null
and breaking an integration test on Windows.

This commit sets COMPUTERNAME in the environment so that our tests get
the value that Elasticsearch would have when bin/elasticsearch.bat is
invoked from the shell.

* Add null check to protect in non-Windows case

What good is it a developer to gain the whole Windows if they forfeit
their Unix? The value that fixes things on Windows is null on
Linux/Darwin, so let's null-check it.

* Override system hostnames for testclusters

Rather than relying on variable system behavior, let's just override
HOSTNAME and COMPUTERNAME and test for correct values in the integration
test that was originally failing.

* Rename constants for clarity

Since we are setting HOSTNAME and COMPUTERNAME regardless of whether the
tests are running on Windows or Linux, we shouldn't imply that constants
are only used in one case or the other.
2019-08-26 11:44:31 -04:00
..
ccs-unavailable-clusters Testclusters: Convert additional projects (#43625) 2019-06-28 16:44:42 +03:00
die-with-dignity Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
evil-tests Deprecate the pidfile setting (#45938) 2019-08-23 21:31:35 -04:00
full-cluster-restart Use index for peer recovery instead of translog (#45137) 2019-08-02 15:00:43 +01:00
logging-config Deprecation messages with the same key but different x-opaque-id are allowed backport(#44587) #44682 2019-07-22 11:38:11 +02:00
mixed-cluster [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
multi-cluster-search Restrict which tasks can use testclusters (#45198) 2019-08-09 13:38:01 +03:00
no-bootstrap-tests Plugins: Remove meta plugins (#30670) 2018-05-18 10:56:08 -07:00
os Improve distro tests base class (#45761) (#45803) 2019-08-21 14:18:26 -07:00
rolling-upgrade Use index for peer recovery instead of translog (#45137) 2019-08-02 15:00:43 +01:00
smoke-test-client Testing conventions: add support for checking base classes (#36650) 2019-01-08 13:39:03 +02:00
smoke-test-http Remove Settings from BaseRestRequest Constructor (#45418) (#45429) 2019-08-12 05:14:45 +02:00
smoke-test-ingest-disabled Testclusters: convert left-overs from checkPart1 (#43370) 2019-06-25 19:14:45 +03:00
smoke-test-ingest-with-all-dependencies Testclusters: Convert additional projects (#43625) 2019-06-28 16:44:42 +03:00
smoke-test-multinode Testclusters: convert left-overs from checkPart1 (#43370) 2019-06-25 19:14:45 +03:00
smoke-test-plugins Testclusters: convert left-overs from checkPart1 (#43370) 2019-06-25 19:14:45 +03:00
unconfigured-node-name Pass COMPUTERNAME env var to elasticsearch.bat (#45763) 2019-08-26 11:44:31 -04:00
verify-version-constants [Backport] Replace usages RandomizedTestingTask with built-in Gradle Test (#40978) (#40993) 2019-04-09 11:52:50 -07:00
wildfly Restrict which tasks can use testclusters (#45198) 2019-08-09 13:38:01 +03:00
build.gradle Convert testclusters to use distro download plugin (#44253) (#44362) 2019-07-15 17:53:05 -07:00