Commit 07456502 authored by Łukasz Nowak's avatar Łukasz Nowak

caddy-frontend/test: Check QUIC after USR1

Asserts Caddy issue https://github.com/mholt/caddy/issues/2394
parent cdd718e1
......@@ -35,6 +35,7 @@ import multiprocessing
import subprocess
from unittest import skip
import ssl
import signal
from BaseHTTPServer import HTTPServer
from BaseHTTPServer import BaseHTTPRequestHandler
from forcediphttpsadapter.adapters import ForcedIPHTTPSAdapter
......@@ -3466,6 +3467,7 @@ class TestQuicEnabled(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertKeyWithPop('Date', result.headers)
self.assertKeyWithPop('Content-Length', result.headers)
def assertQUIC():
quic_status, quic_result = getQUIC(
'https://%s/%s' % (parameter_dict['domain'], 'test-path'),
parameter_dict['public-ipv4'],
......@@ -3487,6 +3489,17 @@ class TestQuicEnabled(SlaveHttpFrontendTestCase, TestDataMixin):
self.assertTrue(key in j, 'No key %r in %s' % (key, j))
self.assertEqual('/test-path', j[key])
assertQUIC()
# https://github.com/mholt/caddy/issues/2394
# after sending USR1 to Caddy QUIC does not work, check current behaviour
caddy_pid = [
q['pid'] for q
in self.getSupervisorRPCServer().supervisor.getAllProcessInfo()
if 'frontend_caddy' in q['name']][0]
os.kill(caddy_pid, signal.SIGUSR1)
assertQUIC()
class TestSlaveBadParameters(SlaveHttpFrontendTestCase, TestDataMixin):
@classmethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment