diff --git a/.github/workflows/ircd-seven.yml b/.github/workflows/ircd-seven.yml new file mode 100644 index 0000000..bdbddc9 --- /dev/null +++ b/.github/workflows/ircd-seven.yml @@ -0,0 +1,58 @@ +name: irctest with ircd-seven + +on: + push: + pull_request: + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v2 + + - name: Set up Python 3.7 + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ~/.cache + $GITHUB_WORKSPACE/ircd-seven + key: ${{ runner.os }}-ircd-seven + + - name: Install dependencies + run: | + sudo apt-get install libhyperscan-dev + python -m pip install --upgrade pip + pip install pytest -r requirements.txt + + - name: Checkout ircd-seven + uses: actions/checkout@v2 + with: + repository: freenode/ircd-seven + ref: ircd-seven-1.1.9 + path: ircd-seven + + - name: Build ircd-seven + run: | + cd $GITHUB_WORKSPACE/ircd-seven/ + autoconf + ./configure --prefix=$HOME/.local/ + make # can't use -j, may cause 'y.tab.h: No such file or directory' + make install + mv $HOME/.local/bin/ircd $HOME/.local/bin/ircd-seven + + - name: Test with pytest + run: | + # testNakWhole fails because ircd-seven sends a trailing space in CAP ACK + # testPartMessage and testBasicPartRfc2812 fail because ircd-seven adds quotes around the message + # testListOne fails because ircd-seven makes channels secret by default + PATH=~/.local/bin:$PATH pytest --controller=irctest.controllers.ircd_seven -k 'not Oragono and not deprecated and not strict and not testDoubleKickMessages and not testNakWhole and not testPartMessage and not testBasicPartRfc2812 and not testListOne' + + diff --git a/README.md b/README.md index 242f56b..350fca5 100644 --- a/README.md +++ b/README.md @@ -104,6 +104,18 @@ cd ~/irctest pytest --controller irctest.controllers.charybdis -k 'not Oragono and not deprecated and not strict' ``` +To run (server) tests on ircd-seven: + +``` +cd /tmp/ +git clone https://github.com/freenode/ircd-seven.git +autoconf +./configure --prefix=$HOME/.local/ +make # can't use -j, may cause 'y.tab.h: No such file or directory' +make install +mv $HOME/.local/bin/ircd $HOME/.local/bin/ircd-seven +``` + To run (server) tests on InspIRCd: ``` diff --git a/irctest/controllers/ircd_seven.py b/irctest/controllers/ircd_seven.py new file mode 100644 index 0000000..d998221 --- /dev/null +++ b/irctest/controllers/ircd_seven.py @@ -0,0 +1,10 @@ +from .charybdis import CharybdisController + + +class IrcdSevenController(CharybdisController): + software_name = "ircd-seven" + binary_name = "ircd-seven" + + +def get_irctest_controller_class(): + return IrcdSevenController diff --git a/irctest/server_tests/test_channel_operations.py b/irctest/server_tests/test_channel_operations.py index 9e3d294..68668cf 100644 --- a/irctest/server_tests/test_channel_operations.py +++ b/irctest/server_tests/test_channel_operations.py @@ -334,6 +334,7 @@ class JoinTestCase(cases.BaseServerTestCase): self.sendLine(1, "MODE #chan +t") self.getMessages(1) + self.getMessages(2) self.sendLine(2, "TOPIC #chan :T0P1C") m = self.getMessage(2) self.assertMessageEqual( diff --git a/irctest/server_tests/test_multi_prefix.py b/irctest/server_tests/test_multi_prefix.py index 7171e77..54889d1 100644 --- a/irctest/server_tests/test_multi_prefix.py +++ b/irctest/server_tests/test_multi_prefix.py @@ -23,10 +23,16 @@ class MultiPrefixTestCase(cases.BaseServerTestCase): # TODO(dan): Make sure +v is voice self.sendLine(1, "NAMES #chan") + reply = self.getMessage(1) self.assertMessageEqual( - self.getMessage(1), + reply, command="353", - params=["foo", "=", "#chan", "@+foo"], + fail_msg="Expected NAMES response (353) with @+foo, got: {msg}", + ) + self.assertMessageEqual( + reply, + command="353", + params=["foo", reply.params[1], "#chan", "@+foo"], fail_msg="Expected NAMES response (353) with @+foo, got: {msg}", ) self.getMessages(1)