Mercurial > prosody-modules
changeset 2195:967ba20e1202
mod_benchmark_storage: Switch to an invalid host and inject a stub host object
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 01 Jun 2016 14:34:30 +0200 |
parents | 136497948bf0 |
children | 09f6e1a09b2b |
files | mod_benchmark_storage/mod_benchmark_storage.lua |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_benchmark_storage/mod_benchmark_storage.lua Wed Jun 01 14:33:57 2016 +0200 +++ b/mod_benchmark_storage/mod_benchmark_storage.lua Wed Jun 01 14:34:30 2016 +0200 @@ -17,7 +17,14 @@ return print("Usage: prosodyctl mod_"..module.name.." <storage driver>"); end - local hostname = "localhost"; + local hostname = "benchmark.invalid"; + prosody.hosts[hostname] = { + type = "local", + events = prosody.events, + modules = {}, + sessions = {}, + users = require "core.usermanager".new_null_provider(hostname) + }; sm.initialize_host(hostname); um.initialize_host(hostname);