Skip to content

Allow for requests to configure the user/token making the request #8458

@ethanjonez

Description

@ethanjonez

Is your feature request related to a problem? Please describe.
We are facing an issue when running tests as different users (via token authentication). The Elastic client states it should be a singleton, however, there is only one chance upon initialisation of the Elastic client to define the connection settings. This means each time we run a test we have to create a new client with a new set of connection settings for the selected user to be tested on.

Describe the solution you'd like
A nice solution would be to configure the token used for each request. Or alternatively, making the Elastic client an IDisposable type.

Describe alternatives you've considered
For now, we are running these tests synchronously and relying on the garbage collector to "dispose" of these when the test has finished.

Additional context
none

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions