tests: Update storagemanager tests for prosody.* namespace change
authorKim Alvefur <zash@zash.se>
Sat, 22 Jul 2023 16:17:13 +0200
changeset 13247 c5ccdfbbe9c1
parent 13246 0d3881bf29a8
child 13248 2902c54f45a6
tests: Update storagemanager tests for prosody.* namespace change Part of an attempt to make these tests work again. Previously they would just explode in a million luarocks stack overflows
spec/core_storagemanager_spec.lua
--- a/spec/core_storagemanager_spec.lua	Sat Jul 22 16:15:48 2023 +0200
+++ b/spec/core_storagemanager_spec.lua	Sat Jul 22 16:17:13 2023 +0200
@@ -1,13 +1,11 @@
 local unpack = table.unpack;
-local server = require "net.server_select";
-package.loaded["net.server"] = server;
 
-local st = require "util.stanza";
+local st = require "prosody.util.stanza";
 
 local function mock_prosody()
 	_G.prosody = {
 		core_post_stanza = function () end;
-		events = require "util.events".new();
+		events = require "prosody.util.events".new();
 		hosts = {};
 		paths = {
 			data = "./data";
@@ -47,10 +45,10 @@
 		insulate(tagged_name.." #storage backend", function ()
 			mock_prosody();
 
-			local config = require "core.configmanager";
-			local sm = require "core.storagemanager";
-			local hm = require "core.hostmanager";
-			local mm = require "core.modulemanager";
+			local config = require "prosody.core.configmanager";
+			local sm = require "prosody.core.storagemanager";
+			local hm = require "prosody.core.hostmanager";
+			local mm = require "prosody.core.modulemanager";
 
 			-- Simple check to ensure insulation is working correctly
 			assert.is_nil(config.get(test_host, "storage"));