Skip to content

Fail faster when in bad state.

Erick Banks requested to merge elasticsearchmisc into master

What does this MR do?

When running elasticsearch tests on my development machine and elasticsearch location was not properly set in qa/qa/ee/resource/settings/elasticsearch.rb @es_url = 'http://localhost:9200' the tests would take a very long time to fail, about 30 minutes.

In this MR I've made a change to add a trivial elasticsearch and check the response code for a 500 error (of any kind matching 5XX where 'X' is any single [positive] integer). If there was a 500 type error the tests fail in about 2 minutes now as opposed to 30.

There's probably a faster way to fail, but I figured this was a good place to start as it's a fail speed increase on the order of 10x.

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Erick Banks

Merge request reports