TUN-5600: Add coverage to component tests for various transports

This parameterizes relevant component tests by transport protocol
where applicable.
The motivation is to have coverage for (graceful or not) shutdown
that was broken in QUIC. That logic (as well as reconnect) is
different depending on the transport, so we should have it
parameterized. In fact, the test is failing for QUIC (and passing
for others) right now, which is expected until we roll out some
edge fixes for QUIC. So we could have caught this earlier on.
This commit is contained in:
Nuno Diegues
2022-01-04 19:20:43 +00:00
parent 1086d5ede5
commit a6faa0c376
3 changed files with 31 additions and 12 deletions

View File

@@ -7,6 +7,7 @@ import pytest
from flaky import flaky
from conftest import CfdModes
from constants import protocols
from util import start_cloudflared, wait_tunnel_ready, check_tunnel_not_connected
@@ -18,9 +19,16 @@ class TestReconnect:
"stdin-control": True,
}
def _extra_config(self, protocol):
return {
"stdin-control": True,
"protocol": protocol,
}
@pytest.mark.skipif(platform.system() == "Windows", reason=f"Currently buggy on Windows TUN-4584")
def test_named_reconnect(self, tmp_path, component_tests_config):
config = component_tests_config(self.extra_config)
@pytest.mark.parametrize("protocol", protocols())
def test_named_reconnect(self, tmp_path, component_tests_config, protocol):
config = component_tests_config(self._extra_config(protocol))
with start_cloudflared(tmp_path, config, new_process=True, allow_input=True, capture_output=False) as cloudflared:
# Repeat the test multiple times because some issues only occur after multiple reconnects
self.assert_reconnect(config, cloudflared, 5)