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

Hi,

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.

Regards,
Lukáš

Seems to me that if I find out how to propagate distinct attributes here: https://github.com/elastic/elasticsearch/blob/master/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/ClusterFormationTasks.groovy#L344

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:
    node_selector:
      attribute:
        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: https://github.com/elastic/elasticsearch/blob/master/buildSrc/src/main/groovy/org/elasticsearch/gradle/test/NodeInfo.groovy#L194
Arguments like tests.es.node.attr.label=foo

Anyone tried this before?

Thanks,
Lukáš

Bump.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.