Distributed Search
openAndWait / (open the main interface)
setTimeout 120000 (sometimes the restart timeout takes a very long time. This raises the default from 30 seconds)
comment Wait for page to load up
waitForDispatchCompleted 10000
clickAndWait adminLink
selectWindow queryFetcher (hereafter, all selenium commands will act within the context of this iframe)
clickAndWait //a[@href='/admin/distributed'] (Go to the distributed homepage)
clickAndWait //a[@href='/admin/distributed/search'] (Go to the distributed search page)
comment Turn on distributed
click enabled_on
clickAndWait //input[@type="submit"]
clickAndWait //a[@href='/admin/settings']
clickAndWait //a[@href='/admin/settings/control']
clickAndWait //input[@value="Restart Now"]
selectWindow
comment Wait for the redirect, login again
type //input[@name='usr'] admin
type //input[@name='pwd'] changeme
clickAndWait //form[@name='loginForm']//input[@name='submit'] submit
waitForDispatchCompleted 10000
comment HANDWAVE - Verify that we have the server pulldown showing.
comment head back into the admin section for various negative tests for adding peers
clickAndWait adminLink
selectWindow queryFetcher (hereafter, all selenium commands will act within the context of this iframe)
clickAndWait //a[@href='/admin/distributed'] (Go to the distributed homepage)
clickAndWait //a[@href='/admin/distributed/search'] (Go to the distributed search page)
comment Verify that we get the error for entering only IP
type //input[@name="server1"] garbage
type //input[@name="port1"]
clickAndWait //input[@type="submit"]
verifyText //div[@class="errorHeader"] Enter both a valid IP address and port number.
comment Verify that we get the error for entering only Port
type //input[@name="server1"]
type //input[@name="port1"] garbage
clickAndWait //input[@type="submit"]
verifyText //div[@class="errorHeader"] Enter both a valid IP address and port number.
comment Verify that we get the error for malformed host and port
type //input[@name="server1"] 10.1.1.fred
type //input[@name="port1"] 9284
clickAndWait //input[@type="submit"]
verifyText //div[@class="errorHeader"] "Could not lookup IP address for host '10.1.1.fred'."
comment Verify that properly formatted IP and port is accepted.
type //input[@name="server1"] 10.1.1.129
type //input[@name="port1"] 8089
clickAndWait //input[@type="submit"]
verifyText //div[@class="noticeHeader"] The Splunk Server's settings have been updated.
comment Verify that going back to thehomepage, we have "1 of 2 servers" now.
comment Verify that clicking the remove link works.
comment Turn off distributed search
click enabled_off
clickAndWait //input[@type="submit"]
clickAndWait //a[@href='/admin/settings/control']
clickAndWait //input[@value="Restart Now"]
selectWindow
type //input[@name='usr'] admin
type //input[@name='pwd'] changeme
clickAndWait //form[@name='loginForm']//input[@name='submit'] submit
waitForDispatchCompleted 10000