Interacting with individual nodes in REST API integration tests using esplugin support

(Lukas Vlcek) #1


I am running integration tests using the REST API esplugin tooling and I want to make sure the do: operators are executed against specific node only.

I am aware of the node-selector filter but I do not know how I can assign different attributes to individual test nodes so that I can filter them using this attribute. Is there any way how I can enhance default elasticsearch.yml config for test nodes and add different attributes to individual nodes? Or is there any other way how I can do it?

I use

integTestCluster {
    numNodes = 2  //or more

in build.gradle to tell esplugin to start cluster with more than a single node.

One alternative would be if I could address individual nodes using node name (node-0, node-1, ...) but that does not seem to be supported atm.


(Lukas Vlcek) #2

Seems to me that if I find out how to propagate distinct attributes here:

for example node.attr.label=foo for the first node and node.attr.label=bar for the second node then I should be able to use:

- do:
        label: foo

to send request to node having label=foo.

Alternative is to find out how to pass arguments via System property to Node here:
Arguments like

Anyone tried this before?