Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add support for pending tests #404

Open
dblock opened this issue Jul 11, 2024 · 0 comments
Open

[FEATURE] Add support for pending tests #404

dblock opened this issue Jul 11, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dblock
Copy link
Member

dblock commented Jul 11, 2024

Is your feature request related to a problem?

In writing tests for _reindex I tried the following.

  - synopsis: Reindex from a remote cluster.
    path: /_reindex
    method: POST
    request_body:
      payload:
        source:
          remote:
            host: https://localhost:9200
            username: admin
            password: password
            socket_timeout: 30s
            connect_timeout: 30s
          index: movies
        dest:
          index: films
    response:
      status: 200
      payload:
        total: 1

This doesn't work because it needs a setting and an SSL cert.

I'd like to include the test, but mark it as pending, not run it, and show the explanation of why it wasn't run.

What solution would you like?

We had #358 that would skip tests, but I'd actually like the test to run, but not fail.

In the test I want to write this:

  - synopsis: Reindex from a remote cluster.
    pending: |
       SSL needs to be configured to trust itself.
       For this to work, will need to:
       1. set reindex.remote.allowlist=localhost:9200 in docker-compose.yml
       2. setup SSL in a way that the docker instance trusts its own cert
    path: /_reindex
    method: POST

Then at runtime it should say

IGNORED (error, SSL needs to be configured to trust itself.)

If the test were to pass, it would actually fail because it shouldn't have been marked pending.

What alternatives have you considered?

  1. Comment out tests.
  2. Remove ability to skip stories in tests. #358
@dblock dblock added enhancement New feature or request untriaged and removed untriaged labels Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant