Software /
code /
prosody
Comparison
spec/core_storagemanager_spec.lua @ 10678:c9251d74a112
storagemanager: Fix unused variable in tests [luacheck]
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 11 Mar 2020 16:07:36 +0000 |
parent | 10677:0054aec3e8c5 |
child | 10679:b50b1eae711c |
comparison
equal
deleted
inserted
replaced
10677:0054aec3e8c5 | 10678:c9251d74a112 |
---|---|
62 sm.initialize_host(test_host); | 62 sm.initialize_host(test_host); |
63 assert(mm.load(test_host, "storage_"..backend_config.storage)); | 63 assert(mm.load(test_host, "storage_"..backend_config.storage)); |
64 | 64 |
65 local sql_it = backend_config.sql and it or pending; | 65 local sql_it = backend_config.sql and it or pending; |
66 | 66 |
67 | |
67 describe("key-value stores", function () | 68 describe("key-value stores", function () |
68 -- These tests rely on being executed in order, disable any order | 69 -- These tests rely on being executed in order, disable any order |
69 -- randomization for this block | 70 -- randomization for this block |
70 randomize(false); | 71 randomize(false); |
71 | 72 |
154 | 155 |
155 sql_it("may delete all instances of a specific key", function () | 156 sql_it("may delete all instances of a specific key", function () |
156 assert.is_function(store.delete_key); | 157 assert.is_function(store.delete_key); |
157 assert(store:set("user9999b", "foo", "hello")); | 158 assert(store:set("user9999b", "foo", "hello")); |
158 | 159 |
159 local ret, err = store:delete_key("bar"); | 160 assert(store:delete_key("bar")); |
160 -- Ensure key was deleted | 161 -- Ensure key was deleted |
161 do | 162 do |
162 local ret, err = store:get("user9999b", "bar"); | 163 local ret, err = store:get("user9999b", "bar"); |
163 assert.is_nil(ret); | 164 assert.is_nil(ret); |
164 assert.is_nil(err); | 165 assert.is_nil(err); |