From 31e60cc3e89768259713ad67a8f282f15e84af65 Mon Sep 17 00:00:00 2001 From: Markus Kötter Date: Fri, 21 Jul 2023 08:06:09 +0200 Subject: tests - additional test for match-final --- tests/configs/match-final | 3 +++ tests/test_config.py | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/configs/match-final b/tests/configs/match-final index f03787da..18e48a92 100644 --- a/tests/configs/match-final +++ b/tests/configs/match-final @@ -6,6 +6,9 @@ Host finally HostName finally.example.org Port 1001 +Host default-port + HostName default-port.example.org + Match final host "*.example.org" !host jump.example.org ProxyJump jump Port 1002 diff --git a/tests/test_config.py b/tests/test_config.py index 89b48472..2e49aa3d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1033,11 +1033,16 @@ class TestComplexMatching: class TestFinalMatching(object): - def test_final(self): + def test_finally(self): result = load_config("match-final").lookup("finally") assert result["proxyjump"] == "jump" assert result["port"] == "1001" + def test_default_port(self): + result = load_config("match-final").lookup("default-port") + assert result["proxyjump"] == "jump" + assert result["port"] == "1002" + def test_negated(self): result = load_config("match-final").lookup("jump") assert result["port"] == "1003" -- cgit v1.2.3