Software /
code /
prosody
Annotate
spec/core_storagemanager_spec.lua @ 10676:33c7e4920591
storagemanager: Add tests for map stores
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 11 Mar 2020 14:36:56 +0000 |
parent | 10541:6c6ff4509082 |
child | 10677:0054aec3e8c5 |
rev | line source |
---|---|
9691
e11e076f0eb8
various: Don't rely on _G.unpack existing
Kim Alvefur <zash@zash.se>
parents:
9536
diff
changeset
|
1 local unpack = table.unpack or unpack; -- luacheck: ignore 113 |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
2 local server = require "net.server_select"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
3 package.loaded["net.server"] = server; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
4 |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
5 local st = require "util.stanza"; |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
6 |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
7 local function mock_prosody() |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
8 _G.prosody = { |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
9 core_post_stanza = function () end; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
10 events = require "util.events".new(); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
11 hosts = {}; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
12 paths = { |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
13 data = "./data"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
14 }; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
15 }; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
16 end |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
17 |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
18 local configs = { |
9491
89e4cbd1a564
storagemanager tests: Also cover memory driver
Kim Alvefur <zash@zash.se>
parents:
9472
diff
changeset
|
19 memory = { |
89e4cbd1a564
storagemanager tests: Also cover memory driver
Kim Alvefur <zash@zash.se>
parents:
9472
diff
changeset
|
20 storage = "memory"; |
89e4cbd1a564
storagemanager tests: Also cover memory driver
Kim Alvefur <zash@zash.se>
parents:
9472
diff
changeset
|
21 }; |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
22 internal = { |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
23 storage = "internal"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
24 }; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
25 sqlite = { |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
26 storage = "sql"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
27 sql = { driver = "SQLite3", database = "prosody-tests.sqlite" }; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
28 }; |
9452
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
29 mysql = { |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
30 storage = "sql"; |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
31 sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }; |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
32 }; |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
33 postgres = { |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
34 storage = "sql"; |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
35 sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }; |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
36 }; |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
37 }; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
38 |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
39 local test_host = "storage-unit-tests.invalid"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
40 |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
41 describe("storagemanager", function () |
9452
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
42 for backend, backend_config in pairs(configs) do |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
43 local tagged_name = "#"..backend; |
9452
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
44 if backend ~= backend_config.storage then |
9d892b2415bf
Fix storage tests so they run, but not by default
Matthew Wild <mwild1@gmail.com>
parents:
9389
diff
changeset
|
45 tagged_name = tagged_name.." #"..backend_config.storage; |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
46 end |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
47 insulate(tagged_name.." #storage backend", function () |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
48 mock_prosody(); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
49 |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
50 local config = require "core.configmanager"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
51 local sm = require "core.storagemanager"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
52 local hm = require "core.hostmanager"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
53 local mm = require "core.modulemanager"; |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
54 |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
55 -- Simple check to ensure insulation is working correctly |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
56 assert.is_nil(config.get(test_host, "storage")); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
57 |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
58 for k, v in pairs(backend_config) do |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
59 config.set(test_host, k, v); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
60 end |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
61 assert(hm.activate(test_host, {})); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
62 sm.initialize_host(test_host); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
63 assert(mm.load(test_host, "storage_"..backend_config.storage)); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
64 |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
65 describe("key-value stores", function () |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
66 -- These tests rely on being executed in order, disable any order |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
67 -- randomization for this block |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
68 randomize(false); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
69 |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
70 local store; |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
71 it("may be opened", function () |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
72 store = assert(sm.open(test_host, "test")); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
73 end); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
74 |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
75 local simple_data = { foo = "bar" }; |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
76 |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
77 it("may set data for a user", function () |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
78 assert(store:set("user9999", simple_data)); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
79 end); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
80 |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
81 it("may get data for a user", function () |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
82 assert.same(simple_data, assert(store:get("user9999"))); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
83 end); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
84 |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
85 it("may remove data for a user", function () |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
86 assert(store:set("user9999", nil)); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
87 local ret, err = store:get("user9999"); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
88 assert.is_nil(ret); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
89 assert.is_nil(err); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
90 end); |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
91 end); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
92 |
10676
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
93 describe("map stores", function () |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
94 -- These tests rely on being executed in order, disable any order |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
95 -- randomization for this block |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
96 randomize(false); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
97 |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
98 local store, kv_store; |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
99 it("may be opened", function () |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
100 store = assert(sm.open(test_host, "test-map", "map")); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
101 end); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
102 |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
103 it("may be opened as a keyval store", function () |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
104 kv_store = assert(sm.open(test_host, "test-map", "keyval")); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
105 end); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
106 |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
107 it("may set a specific key for a user", function () |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
108 assert(store:set("user9999", "foo", "bar")); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
109 assert.same(kv_store:get("user9999"), { foo = "bar" }); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
110 end); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
111 |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
112 it("may get a specific key for a user", function () |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
113 assert.equal("bar", store:get("user9999", "foo")); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
114 end); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
115 |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
116 it("may remove data for a user", function () |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
117 assert(store:set("user9999", "foo", nil)); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
118 do |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
119 local ret, err = store:get("user9999", "foo"); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
120 assert.is_nil(ret); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
121 assert.is_nil(err); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
122 end |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
123 do |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
124 local ret, err = kv_store:get("user9999"); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
125 assert.is_nil(ret); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
126 assert.is_nil(err); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
127 end |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
128 end); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
129 end); |
33c7e4920591
storagemanager: Add tests for map stores
Matthew Wild <mwild1@gmail.com>
parents:
10541
diff
changeset
|
130 |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
131 describe("archive stores", function () |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
132 randomize(false); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
133 |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
134 local archive; |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
135 it("can be opened", function () |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
136 archive = assert(sm.open(test_host, "test-archive", "archive")); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
137 end); |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
138 |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
139 local test_stanza = st.stanza("test", { xmlns = "urn:example:foo" }) |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
140 :tag("foo"):up() |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
141 :tag("foo"):up(); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
142 local test_time = 1539204123; |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
143 |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
144 local test_data = { |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
145 { nil, test_stanza, test_time, "contact@example.com" }; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
146 { nil, test_stanza, test_time+1, "contact2@example.com" }; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
147 { nil, test_stanza, test_time+2, "contact2@example.com" }; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
148 { nil, test_stanza, test_time-1, "contact2@example.com" }; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
149 }; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
150 |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
151 it("can be added to", function () |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
152 for _, data_item in ipairs(test_data) do |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
153 local ok = archive:append("user", unpack(data_item, 1, 4)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
154 assert.truthy(ok); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
155 end |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
156 end); |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
157 |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
158 describe("can be queried", function () |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
159 it("for all items", function () |
10541
6c6ff4509082
tests: Silence [luacheck] warnings
Kim Alvefur <zash@zash.se>
parents:
9691
diff
changeset
|
160 -- luacheck: ignore 211/err |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
161 local data, err = archive:find("user", {}); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
162 assert.truthy(data); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
163 local count = 0; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
164 for id, item, when in data do |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
165 count = count + 1; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
166 assert.truthy(id); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
167 assert(st.is_stanza(item)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
168 assert.equal("test", item.name); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
169 assert.equal("urn:example:foo", item.attr.xmlns); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
170 assert.equal(2, #item.tags); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
171 assert.equal(test_data[count][3], when); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
172 end |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
173 assert.equal(#test_data, count); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
174 end); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
175 |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
176 it("by JID", function () |
10541
6c6ff4509082
tests: Silence [luacheck] warnings
Kim Alvefur <zash@zash.se>
parents:
9691
diff
changeset
|
177 -- luacheck: ignore 211/err |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
178 local data, err = archive:find("user", { |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
179 with = "contact@example.com"; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
180 }); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
181 assert.truthy(data); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
182 local count = 0; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
183 for id, item, when in data do |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
184 count = count + 1; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
185 assert.truthy(id); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
186 assert(st.is_stanza(item)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
187 assert.equal("test", item.name); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
188 assert.equal("urn:example:foo", item.attr.xmlns); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
189 assert.equal(2, #item.tags); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
190 assert.equal(test_time, when); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
191 end |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
192 assert.equal(1, count); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
193 end); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
194 |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
195 it("by time (end)", function () |
10541
6c6ff4509082
tests: Silence [luacheck] warnings
Kim Alvefur <zash@zash.se>
parents:
9691
diff
changeset
|
196 -- luacheck: ignore 211/err |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
197 local data, err = archive:find("user", { |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
198 ["end"] = test_time; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
199 }); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
200 assert.truthy(data); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
201 local count = 0; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
202 for id, item, when in data do |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
203 count = count + 1; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
204 assert.truthy(id); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
205 assert(st.is_stanza(item)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
206 assert.equal("test", item.name); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
207 assert.equal("urn:example:foo", item.attr.xmlns); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
208 assert.equal(2, #item.tags); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
209 assert(test_time >= when); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
210 end |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
211 assert.equal(2, count); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
212 end); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
213 |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
214 it("by time (start)", function () |
10541
6c6ff4509082
tests: Silence [luacheck] warnings
Kim Alvefur <zash@zash.se>
parents:
9691
diff
changeset
|
215 -- luacheck: ignore 211/err |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
216 local data, err = archive:find("user", { |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
217 ["start"] = test_time; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
218 }); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
219 assert.truthy(data); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
220 local count = 0; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
221 for id, item, when in data do |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
222 count = count + 1; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
223 assert.truthy(id); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
224 assert(st.is_stanza(item)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
225 assert.equal("test", item.name); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
226 assert.equal("urn:example:foo", item.attr.xmlns); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
227 assert.equal(2, #item.tags); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
228 assert(test_time <= when); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
229 end |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
230 assert.equal(#test_data -1, count); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
231 end); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
232 |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
233 it("by time (start+end)", function () |
10541
6c6ff4509082
tests: Silence [luacheck] warnings
Kim Alvefur <zash@zash.se>
parents:
9691
diff
changeset
|
234 -- luacheck: ignore 211/err |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
235 local data, err = archive:find("user", { |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
236 ["start"] = test_time; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
237 ["end"] = test_time+1; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
238 }); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
239 assert.truthy(data); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
240 local count = 0; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
241 for id, item, when in data do |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
242 count = count + 1; |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
243 assert.truthy(id); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
244 assert(st.is_stanza(item)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
245 assert.equal("test", item.name); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
246 assert.equal("urn:example:foo", item.attr.xmlns); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
247 assert.equal(2, #item.tags); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
248 assert(when >= test_time, ("%d >= %d"):format(when, test_time)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
249 assert(when <= test_time+1, ("%d <= %d"):format(when, test_time+1)); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
250 end |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
251 assert.equal(2, count); |
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
252 end); |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
253 end); |
9470
0d491bc98b9f
storagemanager tests: Add additional archive query tests
Matthew Wild <mwild1@gmail.com>
parents:
9467
diff
changeset
|
254 |
9471
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
255 it("can selectively delete items", function () |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
256 local delete_id; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
257 do |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
258 local data = assert(archive:find("user", {})); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
259 local count = 0; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
260 for id, item, when in data do --luacheck: ignore 213/item 213/when |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
261 count = count + 1; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
262 if count == 2 then |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
263 delete_id = id; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
264 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
265 assert.truthy(id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
266 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
267 assert.equal(#test_data, count); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
268 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
269 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
270 assert(archive:delete("user", { key = delete_id })); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
271 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
272 do |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
273 local data = assert(archive:find("user", {})); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
274 local count = 0; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
275 for id, item, when in data do --luacheck: ignore 213/item 213/when |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
276 count = count + 1; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
277 assert.truthy(id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
278 assert.not_equal(delete_id, id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
279 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
280 assert.equal(#test_data-1, count); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
281 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
282 end); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
283 |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
284 it("can be purged", function () |
10541
6c6ff4509082
tests: Silence [luacheck] warnings
Kim Alvefur <zash@zash.se>
parents:
9691
diff
changeset
|
285 -- luacheck: ignore 211/err |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
286 local ok, err = archive:delete("user"); |
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
287 assert.truthy(ok); |
9467
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
288 local data, err = archive:find("user", { |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
289 with = "contact@example.com"; |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
290 }); |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
291 assert.truthy(data); |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
292 local count = 0; |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
293 for id, item, when in data do -- luacheck: ignore id item when |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
294 count = count + 1; |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
295 end |
2098794ac866
storagemanager tests: Add some additional checks
Matthew Wild <mwild1@gmail.com>
parents:
9466
diff
changeset
|
296 assert.equal(0, count); |
9466
b70ce39d366f
storagemanager tests: Add initial basic tests for archive stores
Matthew Wild <mwild1@gmail.com>
parents:
9452
diff
changeset
|
297 end); |
9471
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
298 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
299 it("can truncate the oldest items", function () |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
300 local username = "user-truncate"; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
301 for i = 1, 10 do |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
302 assert(archive:append(username, nil, test_stanza, i, "contact@example.com")); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
303 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
304 assert(archive:delete(username, { truncate = 3 })); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
305 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
306 do |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
307 local data = assert(archive:find(username, {})); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
308 local count = 0; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
309 for id, item, when in data do --luacheck: ignore 213/when |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
310 count = count + 1; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
311 assert.truthy(id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
312 assert(st.is_stanza(item)); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
313 assert(when > 7, ("%d > 7"):format(when)); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
314 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
315 assert.equal(3, count); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
316 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
317 end); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
318 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
319 it("overwrites existing keys with new data", function () |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
320 local prefix = ("a"):rep(50); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
321 local username = "user-overwrite"; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
322 assert(archive:append(username, prefix.."-1", test_stanza, test_time, "contact@example.com")); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
323 assert(archive:append(username, prefix.."-2", test_stanza, test_time, "contact@example.com")); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
324 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
325 do |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
326 local data = assert(archive:find(username, {})); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
327 local count = 0; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
328 for id, item, when in data do --luacheck: ignore 213/when |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
329 count = count + 1; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
330 assert.truthy(id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
331 assert.equals(("%s-%d"):format(prefix, count), id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
332 assert(st.is_stanza(item)); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
333 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
334 assert.equal(2, count); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
335 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
336 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
337 local new_stanza = st.clone(test_stanza); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
338 new_stanza.attr.foo = "bar"; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
339 assert(archive:append(username, prefix.."-2", new_stanza, test_time+1, "contact2@example.com")); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
340 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
341 do |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
342 local data = assert(archive:find(username, {})); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
343 local count = 0; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
344 for id, item, when in data do |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
345 count = count + 1; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
346 assert.truthy(id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
347 assert.equals(("%s-%d"):format(prefix, count), id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
348 assert(st.is_stanza(item)); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
349 if count == 2 then |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
350 assert.equals(test_time+1, when); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
351 assert.equals("bar", item.attr.foo); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
352 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
353 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
354 assert.equal(2, count); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
355 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
356 end); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
357 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
358 it("can contain multiple long unique keys #issue1073", function () |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
359 local prefix = ("a"):rep(50); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
360 assert(archive:append("user-issue1073", prefix.."-1", test_stanza, test_time, "contact@example.com")); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
361 assert(archive:append("user-issue1073", prefix.."-2", test_stanza, test_time, "contact@example.com")); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
362 |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
363 local data = assert(archive:find("user-issue1073", {})); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
364 local count = 0; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
365 for id, item, when in data do --luacheck: ignore 213/when |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
366 count = count + 1; |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
367 assert.truthy(id); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
368 assert(st.is_stanza(item)); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
369 end |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
370 assert.equal(2, count); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
371 assert(archive:delete("user-issue1073")); |
6798fcd25e9c
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
Matthew Wild <mwild1@gmail.com>
parents:
9470
diff
changeset
|
372 end); |
9389
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
373 end); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
374 end); |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
375 end |
9ae575efbb1f
Add storage tests (currently only internal and sqlite)
Matthew Wild <mwild1@gmail.com>
parents:
diff
changeset
|
376 end); |