Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • H haproxy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • HAProxy team
  • haproxy
  • Merge requests
  • !3

Simple DEP8 test to actually generate traffic through haproxy

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Andreas Hasenack requested to merge ahasenack/haproxy:haproxy-extra-dep8-test into master Jan 29, 2019
  • Overview 10
  • Commits 3
  • Pipelines 0
  • Changes 2

This adds a test that looks simple and maybe unnecessary at first glance, but it would have caught https://github.com/haproxy/haproxy/commit/52dabbc4fad338233c7f0c96f977a43f8f81452a on arm64.

This particular issue is fixed upstream since 1.8.15, and even though we don't usually add DEP8 tests for all regressions, actually exercising the proxy seems like a good idea for such a test.

Here is the last bit of a test run on a debian sid lxd container:

Removing autopkgtest-satdep (0) ...
autopkgtest [11:59:17]: test proxy-localhost: [-----------------------
+ cat
+ systemctl restart haproxy
+ sed s,/var/www/html/,,
+ md5sum /var/www/html/index.html
+ src_md5=e2620d4a5a0f8d80dd4b16de59af981f  index.html
+ rm -f index.html
+ wget -t1 http://localhost:8080 -O index.html
--2019-01-29 13:59:17--  http://localhost:8080/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:8080... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10701 (10K) [text/html]
Saving to: ‘index.html’

     0K ..........                                            100%  167M=0s

2019-01-29 13:59:17 (167 MB/s) - ‘index.html’ saved [10701/10701]

+ result=0
+ + echo e2620d4a5a0f8d80dd4b16de59af981f  index.html
md5sum -c
+ [ 0 != 0 ]
+ echo OK: index.html downloaded via haproxy matches the source file.
+ exit 0
index.html: OK
OK: index.html downloaded via haproxy matches the source file.
autopkgtest [11:59:17]: test proxy-localhost: -----------------------]
autopkgtest [11:59:17]: test proxy-localhost:  - - - - - - - - - - results - - - - - - - - - -
proxy-localhost      PASS
autopkgtest [11:59:18]: @@@@@@@@@@@@@@@@@@@@ summary
cli                  PASS
proxy-localhost      PASS
Edited Jan 29, 2019 by Andreas Hasenack
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: haproxy-extra-dep8-test