bug68421-ipv6-access-log.phpt 843 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. --TEST--
  2. FPM: bug68421 - IPv6 all addresses and access_log
  3. --SKIPIF--
  4. <?php
  5. include "skipif.inc";
  6. FPM\Tester::skipIfIPv6IsNotSupported();
  7. ?>
  8. --FILE--
  9. <?php
  10. require_once "tester.inc";
  11. $cfg = <<<EOT
  12. [global]
  13. error_log = {{FILE:LOG:ERR}}
  14. [unconfined]
  15. listen = {{ADDR:IPv6:ANY}}
  16. access.log = {{FILE:LOG:ACC}}
  17. ping.path = /ping
  18. ping.response = pong
  19. pm = dynamic
  20. pm.max_children = 5
  21. pm.start_servers = 2
  22. pm.min_spare_servers = 1
  23. pm.max_spare_servers = 3
  24. EOT;
  25. $tester = new FPM\Tester($cfg);
  26. $tester->start();
  27. $tester->expectLogStartNotices();
  28. $tester->ping('127.0.0.1');
  29. $tester->ping('[::1]');
  30. $tester->terminate();
  31. $tester->expectLogTerminatingNotices();
  32. $tester->close();
  33. $tester->printAccessLog();
  34. ?>
  35. Done
  36. --EXPECTF--
  37. 127.0.0.1 %s "GET /ping" 200
  38. ::1 %s "GET /ping" 200
  39. Done
  40. --CLEAN--
  41. <?php
  42. require_once "tester.inc";
  43. FPM\Tester::clean();
  44. ?>