Commit Graph

19 Commits

Author SHA1 Message Date
Mark Vieira cbc73a7665
Register test artifacts for service-account security QA project (#94602) 2023-03-21 12:15:05 -07:00
Mark Vieira 7eb56d088c
Add convenience method for providing conditional test cluster settings (#94246) 2023-03-01 11:14:27 -08:00
Mark Vieira 20dce68e65
Refactor geoip-fixture to remove Docker requirement (#93488) 2023-02-22 12:59:20 -08:00
William Brafford b89fab2f01
Stop suggesting feature migrations for 7.x indices (#93666)
* Don't report MIGRATION_NEEDED for 7.x indices

Eventually, we will need to migrate 7.x indices to 8.x before doing a
significant upgrade of Lucene. However, the migrations to 8.x are not
adequately tested: while they will eventually be needed, they are not
currently needed, and may in fact produce bugs.

This change will ensure that the GET _migration/system_feature API
returns NO_MIGRATION_NEEDED in 8.x. We will begin to require
migrations once we start testing for the next major version upgrade.
2023-02-10 11:58:54 -05:00
Mark Vieira c2eda511de
Add JUnit rule based integration test cluster orchestration framework (#92379)
This commit adds a new test framework for configuring and orchestrating
test clusters for both Java and YAML REST testing. This will eventually
replace the existing "test-clusters" Gradle plugin and the build-time
cluster orchestration.
2022-12-21 15:33:46 -08:00
Mary Gouseti 4901cf837a
Enable the health node and the disk health indicator #84811 (#90085) 2022-09-20 23:32:50 +01:00
Rene Groeschke 8f31c02dad
Port BuildPluginIT to spock (#87104)
We port all our tests for gradle build logic to use spock

Part of #86720
2022-06-02 15:31:00 +02:00
Rene Groeschke bf4304d18a
Remove elasticsearch.rest-test gradle plugin (#85491)
Removes and remaining usages of `elasticsearch.rest-test` and the plugin itself from the codebase

Relates to https://github.com/elastic/elasticsearch/issues/63696
2022-05-17 11:23:04 +02:00
Rene Groeschke 333fe4d840
Fix javadoc plugin func tests on windows (#86674)
Handle special javadoc options path format
2022-05-12 11:45:29 +02:00
Joe Gallo cfe1f11147
Handle .geoip_databases being an alias or a concrete index (#85792) 2022-05-03 15:47:32 -04:00
Artem Prigoda 763d6d510f
Use Java 15 text blocks for JSON and multiline strings (#80751)
The ES code base is quite JSON heavy. It uses a lot of multi-line JSON requests in tests which need to be escaped and concatenated which in turn makes them hard to read. Let's try to leverage Java 15 text blocks for representing them.
2021-12-15 18:01:28 +01:00
Mark Vieira 12ad399c48 Reformat Elasticsearch source 2021-10-27 08:19:51 -07:00
Martijn van Groningen 04e5823a69
Remove default maxmind geoip databases from distribution (#78362)
* Adjusted integration tests to use geoip test fixture or to use test databases provided via config dirs (for qa module / docs).
* Kept the geolite2-databases dependency for most of the unit tests only.
* Made fallback_to_default_databases parameter on geoip processor a noop and emit deprecation warning upon using it.
* If no geoip databases are available yet to a node then the geoip processor factory returns a processor implementation that flags documents that databases are unavailable. This allows these documents to be reindex later with a pipeline. These documents will have a tag string array field, which contains a string _geoip_database_unavailable_{database_name} for each missing database in a pipeline.
* Added reload pipeline capabilities is IngestService, so that when databases are available again on a node then pipelines with geoip processor definition can be reloaded.

Relates to #68920
2021-10-13 14:52:18 +02:00
Chris Hegarty 20c9f756d2
Fix split package org.elasticsearch.common.xcontent (#78831)
Fix the split package org.elasticsearch.common.xcontent, between server and the x-content lib. Move the x-content lib exported package from org.elasticsearch.common.xcontent to org.elasticsearch.xcontent ( following the naming convention of similar libraries ). Removing split packages is a prerequisite to modularization.
2021-10-08 17:14:26 +01:00
Rene Groeschke 6ef13abe81
Do not create unused testCluster (#77581)
* Do not create unused testCluster

This avoids creating test clusters that are not required during the build.
We use lazy configuration here on testClusters and only instantiate them as theyre

* Do not fail on run task (debug)

* Create more test cluster lazy

* Make more test cluster lazy

* Avoid creating unused testcluster

* Fix PluginBuildPlugin

* Fix disabling geo db download

* Fix cluster setup in repository-multi-version

* Polishing

* Fix issue with irretic groovy ogic

* Fix bwc tests

* Fix more bwcTests

* Fix more bwc tests

* Fix more bwc tests

* Fix more bwc tests

* Fix typo

* Minor polishing

* Fix rolling upgrade tests

* Fix cluster config in sql qa mixedcluster project

* Fix more bwc tests

* Clean up before review

* Document test cluster usage

* Api polising after Review

provide useCluster(Provider) method to TestClusterAware

Ideally we take this a step further and realize those test clusters only on use.
But out of scope of this PR.

* Allow gradle provider as value for nonSystemProperties

* Some simplification on test configuration

* Fix typo in rest test config

* Fix more typos

* Fix another typo

* Fix more typos
2021-09-23 03:45:59 -04:00
Ryan Ernst 68817d7ca2
Rename o.e.common in libs/core to o.e.core (#73909)
When libs/core was created, several classes were moved from server's
o.e.common package, but they were not moved to a new package. Split
packages need to go away long term, so that Elasticsearch can even think
about modularization. This commit moves all the classes under o.e.common
in core to o.e.core.

relates #73784
2021-06-08 09:53:28 -07:00
Lyudmila Fokina 3b0b7941ae
Warn users if security is implicitly disabled (#70114)
* Warn users if security is implicitly disabled

Elasticsearch has security features implicitly disabled by default for
Basic and Trial licenses, unless explicitly set in the configuration
file.
This may be good for onboarding, but it also lead to unintended insecure
 clusters.
 This change introduces clear warnings when security features are
 implicitly disabled.
 - a warning header in each REST response if security is implicitly
 disabled;
 - a log message during cluster boot.
2021-04-13 18:33:41 +02:00
Martijn van Groningen 9a18c42d34
Lower resource reload interval in geoip tests (#69480)
Lower resource reload interval setting for tests that reload config maxmind databases.

Closes #69475
2021-02-23 20:17:51 +01:00
Martijn van Groningen 683a14c504
Allow custom geoip databases to be updated at runtime. (#68901)
Custom geoip databases can be provided via the config/ingest-geoip directory,
which are loaded at node startup time. This change adds the functionality
that reloads custom databases at runtime.

Added reference counting when getting a DatabaseReaderLazyLoader instance,
this to avoid closing a maxmind db reader while it is still being used.
There is a small window of time where this might happen during a database update.

A DatabaseReaderLazyLoader instance (which wraps a Maxmind db reader) from config database directory:
* Is closed immediately if there are no usages of it by any geoip processor instance as part of the database reload.
* When there are usages, then it is not closed immediately after a database reload. It is closed by the caller that did the last geoip lookup using this DatabaseReaderLazyLoader instance.
2021-02-23 15:16:52 +01:00