Implemented wehook/test rest API in glusterd2
which will be called by clients to test webhook
connections between all peers in glusterd2
and webhook URL
added rest client code to call webhook/test API
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
The system is going to grow more services that need management.
Instead of passing a gds array around pass a higher level
testCluster type
Signed-off-by: John Mulligan <jmulligan@redhat.com>
A fair number of test cases were sharing the "gds" variable defined
in the volume ops test. Instead of sharing this variable across
test instances we make it local to the function and pass the
parameter as needed. The one unfortunate thing about this change
is that is requires a few wrappers around the functions passed
to t.Run to capture the local variable.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
instead of passing LocalStateDir and ClientAddress
of gdProcess to initRestClient function,
pass gdProcess object to initRestClient
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
if a restauth key is missing in config
file or if restauth is set to true,
glusterd2 will do token authentication.
Authentication can be disabled by
by setting restauth key in the configuration
to false.
updated test cases to use authentication
if auth file is present
added default rest authentication in glustercli
Signed-off-by: Madhu Rajanna <mrajanna@redhat.com>
Add a helper function for tests that need unique test dirs that
creates test directories like /[base]/[testname]/[unique].
Signed-off-by: John Mulligan <jmulligan@redhat.com>
For all practical purposes, in real usage and in tests, the configurable
paths `workdir` and `localstatedir` are set to the same directory which
defaults to `/var/lib/glusterd2` or `/user/local/var/lib/glusterd2`
Unlike glusterd1, glusterd2 does not daemonize itself. The working
directory of the process can be meaningfully set to either current
working directory from where glusterd2 process is started or to
`localstatedir` where glusterd2 stores all its data. We choose the
latter.
This change also reduces ambiguity for users and one less thing to
configure.
Signed-off-by: Prashanth Pai <ppai@redhat.com>