From 836be9b60d1e2b10ec4cdfb3e58281f18c0a31d0 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 27 May 2020 19:44:12 +0200 Subject: scansion: Add test for mod_server_contact_info / XEP-0157 --- spec/scansion/prosody.cfg.lua | 11 +++++++- spec/scansion/server_contact_info.scs | 53 +++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 spec/scansion/server_contact_info.scs (limited to 'spec/scansion') diff --git a/spec/scansion/prosody.cfg.lua b/spec/scansion/prosody.cfg.lua index b7d6ccd5..4cf03de8 100644 --- a/spec/scansion/prosody.cfg.lua +++ b/spec/scansion/prosody.cfg.lua @@ -52,7 +52,7 @@ modules_enabled = { -- Other specific functionality --"limits"; -- Enable bandwidth limiting for XMPP connections --"groups"; -- Shared roster support - --"server_contact_info"; -- Publish contact information for this service + "server_contact_info"; -- Publish contact information for this service --"announce"; -- Send announcement to all online users --"welcome"; -- Welcome users who register accounts --"watchregistrations"; -- Alert admins of registrations @@ -65,6 +65,15 @@ modules_enabled = { --"scansion_record"; -- Records things that happen in scansion test case format } +contact_info = { + abuse = { "mailto:abuse@localhost", "xmpp:abuse@localhost" }; + admin = { "mailto:admin@localhost", "xmpp:admin@localhost" }; + feedback = { "http://localhost/feedback.html", "mailto:feedback@localhost", "xmpp:feedback@localhost" }; + sales = { "xmpp:sales@localhost" }; + security = { "xmpp:security@localhost" }; + support = { "https://localhost/support.html", "xmpp:support@localhost" }; +} + modules_disabled = { "s2s"; } diff --git a/spec/scansion/server_contact_info.scs b/spec/scansion/server_contact_info.scs new file mode 100644 index 00000000..15537e11 --- /dev/null +++ b/spec/scansion/server_contact_info.scs @@ -0,0 +1,53 @@ +# XEP-0157: Contact Addresses for XMPP Services +# mod_server_contact_info + +[Client] Romeo + jid: romeo@localhost + password: password + +----- + +Romeo connects + +Romeo sends: + + + + +# Ignore other disco#info features, identities etc + +Romeo receives: + + + + + http://jabber.org/network/serverinfo + + + mailto:abuse@localhost + xmpp:abuse@localhost + + + mailto:admin@localhost + xmpp:admin@localhost + + + http://localhost/feedback.html + mailto:feedback@localhost + xmpp:feedback@localhost + + + xmpp:sales@localhost + + + xmpp:security@localhost + + + https://localhost/support.html + xmpp:support@localhost + + + + + +Romeo disconnects -- cgit v1.2.3