mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-02-10 18:31:20 +02:00
fixed proxy test that relied on map ordering
This commit is contained in:
parent
3293deaec6
commit
bf7f9c823c
@ -10,12 +10,10 @@ func TestProxy(t *testing.T) {
|
|||||||
// proxy shell script.
|
// proxy shell script.
|
||||||
p := Proxy{}
|
p := Proxy{}
|
||||||
p.Set("8080", "172.1.4.5")
|
p.Set("8080", "172.1.4.5")
|
||||||
p.Set("8000", "172.1.3.1")
|
|
||||||
b := p.Bytes()
|
b := p.Bytes()
|
||||||
|
|
||||||
expected := `#!/bin/bash
|
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: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 {
|
if string(b) != expected {
|
||||||
t.Errorf("Invalid proxy \n%s", expected)
|
t.Errorf("Invalid proxy \n%s", expected)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user