Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
travis: enable tests for Prosody 0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
horazont committed Dec 15, 2018
1 parent b6ee1fa commit ab5e8d9
Show file tree
Hide file tree
Showing 9 changed files with 264 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python:
- "3.6"
- "3.7-dev"
env:
- TEST_MODE=e2e-prosody PROSODY_BRANCH=0.10
- TEST_MODE=e2e-prosody PROSODY_BRANCH=0.11
matrix:
include:
- python: "3.6"
Expand All @@ -25,6 +25,8 @@ matrix:
- docker
- python: "3.6"
env: TEST_MODE=e2e-prosody PROSODY_BRANCH=0.9
- python: "3.6"
env: TEST_MODE=e2e-prosody PROSODY_BRANCH=0.10
- python: "3.6"
env: TEST_MODE=e2e-prosody PROSODY_BRANCH=trunk
- python: "3.6"
Expand All @@ -39,7 +41,7 @@ matrix:
- python: "3.6"
env: TEST_MODE=e2e-prosody PROSODY_BRANCH=trunk
- python: "3.7-dev"
env: TEST_MODE=e2e-prosody PROSODY_BRANCH=0.10
env: TEST_MODE=e2e-prosody PROSODY_BRANCH=0.11
- python: "3.6"
env: TEST_MODE=e2e-metronome METRONOME_VERSION=master
addons:
Expand Down
6 changes: 5 additions & 1 deletion utils/install-prosody.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ luarocks install luafilesystem
luarocks install luasocket
luarocks install luasec
luarocks install luabitop
hg clone https://hg.prosody.im/$PROSODY_BRANCH/ prosody
HG_FLAGS=
if [ "x$PROSODY_BRANCH" = 'x0.11' ]; then
HG_FLAGS="$HG_FLAGS -b 0.11"
fi
hg clone $HG_FLAGS https://hg.prosody.im/$PROSODY_BRANCH/ prosody
hg clone https://hg.prosody.im/prosody-modules/ prosody-modules
cp -r utils/prosody-cfg/$PROSODY_BRANCH/* prosody/
cd prosody
Expand Down
14 changes: 14 additions & 0 deletions utils/prosody-cfg/0.11/0001-pubsub.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- a/plugins/mod_pubsub/mod_pubsub.lua Tue Apr 04 01:31:51 2017 +0200
+++ b/plugins/mod_pubsub/mod_pubsub.lua Tue Apr 04 20:58:01 2017 +0200
@@ -125,7 +125,10 @@
end);

local admin_aff = module:get_option_string("default_admin_affiliation", "owner");
-local function get_affiliation(jid)
+local function get_affiliation(jid, node, action)
+ if action == "create" then
+ return "owner";
+ end
local bare_jid = jid_bare(jid);
if bare_jid == module.host or usermanager.is_admin(bare_jid, module.host) then
return admin_aff;
23 changes: 23 additions & 0 deletions utils/prosody-cfg/0.11/certs/localhost.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-----BEGIN CERTIFICATE-----
MIID7DCCAtSgAwIBAgIJAI8C/rGQ8PCRMA0GCSqGSIb3DQEBCwUAMG0xCzAJBgNV
BAYTAkdCMRMwEQYDVQQKDApQcm9zb2R5IElNMSswKQYDVQQLDCJodHRwOi8vcHJv
c29keS5pbS9kb2MvY2VydGlmaWNhdGVzMRwwGgYDVQQDDBNFeGFtcGxlIGNlcnRp
ZmljYXRlMCAXDTE3MTAxNDE3MjMwMFoYDzIxMTcwOTIwMTcyMzAwWjBtMQswCQYD
VQQGEwJHQjETMBEGA1UECgwKUHJvc29keSBJTTErMCkGA1UECwwiaHR0cDovL3By
b3NvZHkuaW0vZG9jL2NlcnRpZmljYXRlczEcMBoGA1UEAwwTRXhhbXBsZSBjZXJ0
aWZpY2F0ZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOgmcIsbIhJO
TM8ItgOprXRwP1GE3H93azuhUVz76+53hyY+IxpF24/LgjAJR02O9CLP298eO2BV
NO0In0LZ/VbITHao9iQCtVRQBLUnhkw8I7PCQY2rroqsOYOOYl2U4P03bcMF+tpG
o5YsxOBOdNsgVLCn/LhfzdBycbkXpQfL6k9Y4BmWXoCB84TuL7aqrHk8tbeSfJ7t
4BgMXLUd4XdhF7Mz1v9PAZJ7gx1w5BLiDfXlwoNl/QDTUkw4PhANFrtF3ggbjI+6
5TKiOS3dysS3eVWEnlPjzIsjN9CrMELFcdwKmMgkkLRoxExWJKM4TzXyc5w/b7iW
Ir+gQgjFMN8CAwEAAaOBjDCBiTAMBgNVHRMEBTADAQH/MHkGA1UdEQRyMHCCCWxv
Y2FsaG9zdKAkBggrBgEFBQcIB6AYFhZfeG1wcC1jbGllbnQubG9jYWxob3N0oCQG
CCsGAQUFBwgHoBgWFl94bXBwLXNlcnZlci5sb2NhbGhvc3SgFwYIKwYBBQUHCAWg
CwwJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4IBAQDAf6cV69dFUn1DwwLE4uR+
QVhNi9rOM9/kjlPNgFDCC35mz0mr2FF+yeKRP+BVdqeDrcjBMioCodRtHmJ5y6Na
caTXbFaZlP4jVzyo+nxq4g6znn9gNKB6q0Ry6ps/+g388IQQnaVr3WuBr5rEGzZ8
g/ioWb2LBa5wMJ2/xjnw4Q6Z7mtS9dhEDDvwAaq7pBHMUCZNwbaabc4D8lAlqKPq
KyKqrbVSjkofI7YwzLIGUAUtaBnV0adHlxQ3aZjYth6HkkEMcRBEX0NG7spYAGFX
LXeHz5troPTdc85T2W5qEjOzPNGrl+jLCkWGEhvtYctPqHQaOJKZ4YL6c1hGE7WR
-----END CERTIFICATE-----
27 changes: 27 additions & 0 deletions utils/prosody-cfg/0.11/certs/localhost.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEA6CZwixsiEk5Mzwi2A6mtdHA/UYTcf3drO6FRXPvr7neHJj4j
GkXbj8uCMAlHTY70Is/b3x47YFU07QifQtn9VshMdqj2JAK1VFAEtSeGTDwjs8JB
jauuiqw5g45iXZTg/TdtwwX62kajlizE4E502yBUsKf8uF/N0HJxuRelB8vqT1jg
GZZegIHzhO4vtqqseTy1t5J8nu3gGAxctR3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Rhv4IXDqPRl6ivgBvuVJ9KZXm2/DCfoC5HpW
1FdaHWDycVIl/NBttpygaLbtoS75HVJaZTiOQIKd+mfEp0sUgNRIk4IugYORC6CF
kn9uomUCgYBEpDU3CgIYPXmGip/RPLm+gQPFBKB71f5O2jxqHJZ0CorV13W/FS+g
8om0w2U293z3zjVdiIk9cc+qEEoihn5/iT3i5sud/oo6ns2p//eoDrGk8dMDu9pn
fo78Z9y/PtsQVbLi0mSpbGbmh57/H3cHiIOGgs7G7brWcIO0zu8/uw==
-----END RSA PRIVATE KEY-----
9 changes: 9 additions & 0 deletions utils/prosody-cfg/0.11/e2etest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[global]
provisioner=aioxmpp.e2etest.provision.AnonymousProvisioner

[aioxmpp.e2etest.provision.AnonymousProvisioner]
host=localhost
pin_store=.travis-pinstore.json
pin_type=0
no_verfiy=true
block_features={"localhost": ["http://jabber.org/protocol/pubsub#*"]}
3 changes: 3 additions & 0 deletions utils/prosody-cfg/0.11/link.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
ln -s "$(pwd)/../prosody-modules/mod_storage_memory" plugins/
ln -s "$(pwd)/../prosody-modules/mod_http_upload" plugins/
2 changes: 2 additions & 0 deletions utils/prosody-cfg/0.11/patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
patch -p1 < 0001-pubsub.patch
177 changes: 177 additions & 0 deletions utils/prosody-cfg/0.11/prosody.cfg.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
-- Prosody Example Configuration File
--
-- Information on configuring Prosody can be found on our
-- website at http://prosody.im/doc/configure
--
-- Tip: You can check that the syntax of this file is correct
-- when you have finished by running: prosodyctl check config
-- If there are any errors, it will let you know what and where
-- they are, otherwise it will keep quiet.
--
-- The only thing left to do is rename this file to remove the .dist ending, and fill in the
-- blanks. Good luck, and happy Jabbering!


---------- Server-wide settings ----------
-- Settings in this section apply to the whole server and are the default settings
-- for any virtual hosts

-- This is a (by default, empty) list of accounts that are admins
-- for the server. Note that you must create the accounts separately
-- (see http://prosody.im/doc/creating_accounts for info)
-- Example: admins = { "user1@example.com", "user2@example.net" }
admins = { }

-- Enable use of libevent for better performance under high load
-- For more information see: http://prosody.im/doc/libevent
--use_libevent = true

-- This is the list of modules Prosody will load on startup.
-- It looks for mod_modulename.lua in the plugins folder, so make sure that exists too.
-- Documentation on modules can be found at: http://prosody.im/doc/modules
modules_enabled = {

-- Generally required
"roster"; -- Allow users to have a roster. Recommended ;)
"saslauth"; -- Authentication for clients and servers. Recommended if you want to log in.
"tls"; -- Add support for secure TLS on c2s/s2s connections
"dialback"; -- s2s dialback support
"disco"; -- Service discovery

-- Not essential, but recommended
"private"; -- Private XML storage (for room bookmarks, etc.)
"vcard"; -- Allow users to set vCards

-- These are commented by default as they have a performance impact
"blocklist"; -- Allow users to block communications with other users
--"compression"; -- Stream compression

-- Nice to have
"version"; -- Replies to server version requests
"uptime"; -- Report how long server has been running
"time"; -- Let others know the time here on this server
"ping"; -- Replies to XMPP pings with pongs
"register"; -- Allow users to register on this server using a client and change passwords

-- Admin interfaces
"admin_adhoc"; -- Allows administration via an XMPP client that supports ad-hoc commands
--"admin_telnet"; -- Opens telnet console interface on localhost port 5582

-- HTTP modules
--"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
--"http_files"; -- Serve static files from a directory over HTTP

-- Other specific functionality
--"groups"; -- Shared roster support
--"announce"; -- Send announcement to all online users
--"welcome"; -- Welcome users who register accounts
--"watchregistrations"; -- Alert admins of registrations
--"motd"; -- Send a message to users when they log in
--"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
"pep";
}

-- These modules are auto-loaded, but should you want
-- to disable them then uncomment them here:
modules_disabled = {
-- "offline"; -- Store offline messages
-- "c2s"; -- Handle client connections
-- "s2s"; -- Handle server-to-server connections
-- "posix"; -- POSIX functionality, sends server to background, enables syslog, etc.
}

-- Disable account creation by default, for security
-- For more information see http://prosody.im/doc/creating_accounts
allow_registration = false

-- These are the SSL/TLS-related settings. If you don't want
-- to use SSL/TLS, you may comment or remove this
ssl = {
key = "certs/localhost.key";
certificate = "certs/localhost.crt";
}

-- Force clients to use encrypted connections? This option will
-- prevent clients from authenticating unless they are using encryption.

c2s_require_encryption = true

-- Force certificate authentication for server-to-server connections?
-- This provides ideal security, but requires servers you communicate
-- with to support encryption AND present valid, trusted certificates.
-- NOTE: Your version of LuaSec must support certificate verification!
-- For more information see http://prosody.im/doc/s2s#security

s2s_secure_auth = false

-- Many servers don't support encryption or have invalid or self-signed
-- certificates. You can list domains here that will not be required to
-- authenticate using certificates. They will be authenticated using DNS.

--s2s_insecure_domains = { "gmail.com" }

-- Even if you leave s2s_secure_auth disabled, you can still require valid
-- certificates for some domains by specifying a list here.

--s2s_secure_domains = { "jabber.org" }

-- Select the authentication backend to use. The 'internal' providers
-- use Prosody's configured data storage to store the authentication data.
-- To allow Prosody to offer secure authentication mechanisms to clients, the
-- default provider stores passwords in plaintext. If you do not trust your
-- server please see http://prosody.im/doc/modules/mod_auth_internal_hashed
-- for information about using the hashed backend.

authentication = "anonymous"
-- authentication = "internal_plain"

-- Select the storage backend to use. By default Prosody uses flat files
-- in its configured data directory, but it also supports more backends
-- through modules. An "sql" backend is included by default, but requires
-- additional dependencies. See http://prosody.im/doc/storage for more info.

storage = "memory" -- Default is "internal"

-- For the "sql" backend, you can uncomment *one* of the below to configure:
--sql = { driver = "SQLite3", database = "prosody.sqlite" } -- Default. 'database' is the filename.
--sql = { driver = "MySQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }
--sql = { driver = "PostgreSQL", database = "prosody", username = "prosody", password = "secret", host = "localhost" }

-- Logging configuration
-- For advanced logging see http://prosody.im/doc/logging
log = {
-- "*syslog"; -- Uncomment this for logging to syslog
debug = "*console"; -- Log to the console, useful for debugging with daemonize=false
}

----------- Virtual hosts -----------
-- You need to add a VirtualHost entry for each domain you wish Prosody to serve.
-- Settings under each VirtualHost entry apply *only* to that host.

VirtualHost "localhost"
Component "muc.localhost" "muc"
Component "pubsub.localhost" "pubsub"
default_unowned_affiliation = "owner"
Component "upload.localhost" "http_upload"
http_upload_path = "/tmp"


------ Components ------
-- You can specify components to add hosts that provide special services,
-- like multi-user conferences, and transports.
-- For more information on components, see http://prosody.im/doc/components

---Set up a MUC (multi-user chat) room server on conference.example.com:
--Component "conference.example.com" "muc"

-- Set up a SOCKS5 bytestream proxy for server-proxied file transfers:
--Component "proxy.example.com" "proxy65"

---Set up an external component (default component port is 5347)
--
-- External components allow adding various services, such as gateways/
-- transports to other networks like ICQ, MSN and Yahoo. For more info
-- see: http://prosody.im/doc/components#adding_an_external_component
--
--Component "gateway.example.com"
-- component_secret = "password"

0 comments on commit ab5e8d9

Please sign in to comment.