# HG changeset patch # User Kim Alvefur # Date 1577133190 -3600 # Node ID 6c6ff450908207663f59d18ba7f5f99504e41f07 # Parent 375d31225d532a671ec8a3a3a73b7803afe2c4c4 tests: Silence [luacheck] warnings diff -r 375d31225d53 -r 6c6ff4509082 spec/core_storagemanager_spec.lua --- a/spec/core_storagemanager_spec.lua Mon Dec 23 21:29:34 2019 +0100 +++ b/spec/core_storagemanager_spec.lua Mon Dec 23 21:33:10 2019 +0100 @@ -119,6 +119,7 @@ describe("can be queried", function () it("for all items", function () + -- luacheck: ignore 211/err local data, err = archive:find("user", {}); assert.truthy(data); local count = 0; @@ -135,6 +136,7 @@ end); it("by JID", function () + -- luacheck: ignore 211/err local data, err = archive:find("user", { with = "contact@example.com"; }); @@ -153,6 +155,7 @@ end); it("by time (end)", function () + -- luacheck: ignore 211/err local data, err = archive:find("user", { ["end"] = test_time; }); @@ -171,6 +174,7 @@ end); it("by time (start)", function () + -- luacheck: ignore 211/err local data, err = archive:find("user", { ["start"] = test_time; }); @@ -189,6 +193,7 @@ end); it("by time (start+end)", function () + -- luacheck: ignore 211/err local data, err = archive:find("user", { ["start"] = test_time; ["end"] = test_time+1; @@ -239,6 +244,7 @@ end); it("can be purged", function () + -- luacheck: ignore 211/err local ok, err = archive:delete("user"); assert.truthy(ok); local data, err = archive:find("user", { diff -r 375d31225d53 -r 6c6ff4509082 spec/util_async_spec.lua --- a/spec/util_async_spec.lua Mon Dec 23 21:29:34 2019 +0100 +++ b/spec/util_async_spec.lua Mon Dec 23 21:33:10 2019 +0100 @@ -544,6 +544,8 @@ assert.equal(r1.state, "ready"); end); + -- luacheck: ignore 211/rf + -- FIXME what's rf? it("should support multiple done() calls", function () local processed_item; local wait, done; diff -r 375d31225d53 -r 6c6ff4509082 spec/util_pubsub_spec.lua --- a/spec/util_pubsub_spec.lua Mon Dec 23 21:29:34 2019 +0100 +++ b/spec/util_pubsub_spec.lua Mon Dec 23 21:33:10 2019 +0100 @@ -101,6 +101,7 @@ assert(service:publish("node", true, "1", "item 1", { myoption = true })); local ok, config = assert(service:get_node_config("node", true)); + assert.truthy(ok); assert.equals(true, config.myoption); end); @@ -229,6 +230,7 @@ end); it("should be the default", function () local ok, config = service:get_node_config("test", true); + assert.truthy(ok); assert.equal("open", config.access_model); end); it("should allow anyone to subscribe", function () @@ -250,6 +252,7 @@ end); it("should be present in the configuration", function () local ok, config = service:get_node_config("test", true); + assert.truthy(ok); assert.equal("whitelist", config.access_model); end); it("should not allow anyone to subscribe", function () @@ -294,6 +297,7 @@ end); it("should be the default", function () local ok, config = service:get_node_config("test", true); + assert.truthy(ok); assert.equal("publishers", config.publish_model); end); it("should not allow anyone to publish", function () @@ -304,6 +308,7 @@ end); it("should allow publishers to publish", function () assert(service:set_affiliation("test", true, "mypublisher", "publisher")); + -- luacheck: ignore 211/err local ok, err = service:publish("test", "mypublisher", "item1", "foo"); assert.is_true(ok); end); @@ -342,6 +347,7 @@ end); it("should allow publishers to publish without a subscription", function () assert(service:set_affiliation("test", true, "mypublisher", "publisher")); + -- luacheck: ignore 211/err local ok, err = service:publish("test", "mypublisher", "item1", "foo"); assert.is_true(ok); end);