mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-29 21:31:02 +00:00
fixed proxy test that relied on map ordering
This commit is contained in:
parent
3293deaec6
commit
bf7f9c823c
1 changed files with 0 additions and 2 deletions
|
@ -10,12 +10,10 @@ func TestProxy(t *testing.T) {
|
|||
// proxy shell script.
|
||||
p := Proxy{}
|
||||
p.Set("8080", "172.1.4.5")
|
||||
p.Set("8000", "172.1.3.1")
|
||||
b := p.Bytes()
|
||||
|
||||
expected := `#!/bin/bash
|
||||
[ -x /usr/bin/socat ] && socat TCP-LISTEN:8080,fork TCP:172.1.4.5:8080 &
|
||||
[ -x /usr/bin/socat ] && socat TCP-LISTEN:8000,fork TCP:172.1.3.1:8000 &
|
||||
`
|
||||
if string(b) != expected {
|
||||
t.Errorf("Invalid proxy \n%s", expected)
|
||||
|
|
Loading…
Reference in a new issue