From aaf2d267a811af97bdf787fe39aab5d5f4e91b00 Mon Sep 17 00:00:00 2001 From: Jim Garlick Date: Sun, 26 Feb 2017 17:10:55 +0000 Subject: [PATCH] test: add test for unknown unsub topic --- t/lua/t0003-events.t | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/t/lua/t0003-events.t b/t/lua/t0003-events.t index 4837ccd5b069..a602a57e5c3f 100755 --- a/t/lua/t0003-events.t +++ b/t/lua/t0003-events.t @@ -1,13 +1,13 @@ #!/usr/bin/env lua -- --- Basic flux reactor testing using ping interface to kvs +-- Basic flux event testing -- local test = require 'fluxometer'.init (...) test:start_session {} local fmt = string.format -plan (20) +plan (22) local flux = require_ok ('flux') local f, err = flux.new() @@ -18,6 +18,11 @@ local rc, err = f:subscribe ("testevent.") isnt (rc, -1, "subscribe: return code >= 0") is (err, nil, "subscribe: error is nil") +local rc, err = f:unsubscribe ("notmytopic") +is (rc, nil, "unsubscribe: return code == nil") +is (err, "No such file or directory", + "unsubscribe: error is No such file or directory") + local rc, err = f:sendevent ({ test = "xxx" }, "testevent.1") isnt (rc, -1, "sendevent: return code >= 0") is (err, nil, "sendevent: error is nil")