summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2015-07-01 15:40:06 +0200
committerJosé A. Rivera <jarrpa@samba.org>2015-07-14 21:21:20 +0200
commitd6a4a2ddb3882179408359011363d4fd855a6ece (patch)
tree88089f592090c59c6400999747252f825984acd3 /source4
parentd2700282ec4683710703c002552113aea6aee722 (diff)
downloadsamba-d6a4a2ddb3882179408359011363d4fd855a6ece.tar.gz
s4-torture: do some more inspection on expected witness_AsyncNotify replies.
Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Jose A. Rivera <jarrpa@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rpc/witness.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/torture/rpc/witness.c b/source4/torture/rpc/witness.c
index 150ba7680b0..9e56b18866b 100644
--- a/source4/torture/rpc/witness.c
+++ b/source4/torture/rpc/witness.c
@@ -702,6 +702,21 @@ static bool test_witness_AsyncNotify(struct torture_context *tctx,
dcerpc_witness_AsyncNotify_r_recv(req, tctx),
"failed to receive reply");
+ torture_assert_int_equal(tctx, response->num, 1, "num");
+ torture_assert_int_equal(tctx, response->type, WITNESS_NOTIFY_RESOURCE_CHANGE, "type");
+
+ /*
+ * TODO: find out how ClusterResourceOfflinePending and
+ * ClusterResourceOnlinePending are represented as witness
+ * types.
+ */
+
+ if (new_state == ClusterResourceOffline) {
+ torture_assert_int_equal(tctx, response->messages[0].resource_change.type, WITNESS_RESOURCE_STATE_UNAVAILABLE, "resource_change.type");
+ }
+ if (new_state == ClusterResourceOnline) {
+ torture_assert_int_equal(tctx, response->messages[0].resource_change.type, WITNESS_RESOURCE_STATE_AVAILABLE, "resource_change.type");
+ }
torture_assert(tctx,
test_witness_UnRegister_with_handle(tctx, p, &state->context_handle),
"Failed to unregister");