integTestCluster waitCondition

integTestCluster {
dependsOn buildZip
setting "xpack.monitoring.enabled", "false" // monitoring depends on painless which is not available to us
setting "xpack.ml.enabled", "false" // ml has named writeables and the check for cluster state consistency doesn't know about them
setting "xpack.security.authc.realms.custom.order", "0"
setting "xpack.security.authc.realms.custom.type", "custom"
setting "xpack.security.authc.realms.custom.users.user1.password", "changeme"
setting "xpack.security.authc.realms.custom.users.user1.roles", "superuser"
setting "xpack.security.authc.realms.custom.users.user2.password", "changeme"
setting "xpack.security.authc.realms.custom.users.user2.roles", "superuser"
setting "xpack.security.authc.realms.custom.users.user3.password", "changeme"
setting "xpack.security.authc.realms.custom.users.user3.roles", "superuser"
setting "xpack.security.authc.realms.file.order", "1"
setting "xpack.security.authc.realms.file.type", "file"

setupCommand 'installXPackPlugin',
        'bin/elasticsearch-plugin', 'install', configurations.testRuntime.filter { File file -> file.getName().equals ("x-pack-${version}.zip".toString()) }.getSingleFile().toURI().toString()
setupCommand 'setupDummyUser',
        'bin/x-pack/users', 'useradd', 'test_user', '-p', 'changeme', '-r', 'superuser'
setupCommand 'installExtension',
        'bin/x-pack/extension', 'install', 'file:' + buildZip.archivePath
waitCondition = { node, ant ->
    File tmpFile = new File(node.cwd, 'wait.success')
    **ant.get(src: "http://${node.httpUri()}",**

** dest: tmpFile.toString(),**
** username: 'test_user',**
** password: 'changeme',**
** ignoreerrors: true,**
** retries: 10)**
return tmpFile.exists()
}

is there a way to pass HTTP custom header in the ant get call? The documentation of the ant tasks says we can't pass HTTP headers. What are the other options other than ant get?

appreciate your help

You'll need to craft your own http call, using a java http lib. The waitCondition closure just needs to return true or false, the logic is up to the implementor.

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