Fix tests with lets encrypt
Signed-off-by: Emile Vauge <emile@vauge.com>
This commit is contained in:
parent
1ab9c82dfb
commit
87e8393b07
4 changed files with 12 additions and 19 deletions
|
@ -46,10 +46,9 @@ func (s *SimpleSuite) TestSimpleDefaultConfig(c *check.C) {
|
||||||
// TODO validate : run on 80
|
// TODO validate : run on 80
|
||||||
resp, err := http.Get("http://127.0.0.1:8000/")
|
resp, err := http.Get("http://127.0.0.1:8000/")
|
||||||
|
|
||||||
// Expected no response as we did not configure anything
|
// Expected a 404 as we did not configure anything
|
||||||
c.Assert(resp, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(err, checker.NotNil)
|
c.Assert(resp.StatusCode, checker.Equals, 404)
|
||||||
c.Assert(err.Error(), checker.Contains, fmt.Sprintf("getsockopt: connection refused"))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *SimpleSuite) TestWithWebConfig(c *check.C) {
|
func (s *SimpleSuite) TestWithWebConfig(c *check.C) {
|
||||||
|
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
checker "github.com/vdemeester/shakers"
|
checker "github.com/vdemeester/shakers"
|
||||||
check "gopkg.in/check.v1"
|
check "gopkg.in/check.v1"
|
||||||
)
|
)
|
||||||
|
@ -20,8 +19,7 @@ func (s *ConsulSuite) TestSimpleConfiguration(c *check.C) {
|
||||||
// TODO validate : run on 80
|
// TODO validate : run on 80
|
||||||
resp, err := http.Get("http://127.0.0.1:8000/")
|
resp, err := http.Get("http://127.0.0.1:8000/")
|
||||||
|
|
||||||
// Expected no response as we did not configure anything
|
// Expected a 404 as we did not configure anything
|
||||||
c.Assert(resp, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(err, checker.NotNil)
|
c.Assert(resp.StatusCode, checker.Equals, 404)
|
||||||
c.Assert(err.Error(), checker.Contains, fmt.Sprintf("getsockopt: connection refused"))
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"fmt"
|
|
||||||
checker "github.com/vdemeester/shakers"
|
checker "github.com/vdemeester/shakers"
|
||||||
check "gopkg.in/check.v1"
|
check "gopkg.in/check.v1"
|
||||||
)
|
)
|
||||||
|
@ -20,8 +19,7 @@ func (s *EtcdSuite) TestSimpleConfiguration(c *check.C) {
|
||||||
// TODO validate : run on 80
|
// TODO validate : run on 80
|
||||||
resp, err := http.Get("http://127.0.0.1:8000/")
|
resp, err := http.Get("http://127.0.0.1:8000/")
|
||||||
|
|
||||||
// Expected no response as we did not configure anything
|
// Expected a 404 as we did not configure anything
|
||||||
c.Assert(resp, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(err, checker.NotNil)
|
c.Assert(resp.StatusCode, checker.Equals, 404)
|
||||||
c.Assert(err.Error(), checker.Contains, fmt.Sprintf("getsockopt: connection refused"))
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"time"
|
"time"
|
||||||
|
@ -20,8 +19,7 @@ func (s *MarathonSuite) TestSimpleConfiguration(c *check.C) {
|
||||||
// TODO validate : run on 80
|
// TODO validate : run on 80
|
||||||
resp, err := http.Get("http://127.0.0.1:8000/")
|
resp, err := http.Get("http://127.0.0.1:8000/")
|
||||||
|
|
||||||
// Expected no response as we did not configure anything
|
// Expected a 404 as we did not configure anything
|
||||||
c.Assert(resp, checker.IsNil)
|
c.Assert(err, checker.IsNil)
|
||||||
c.Assert(err, checker.NotNil)
|
c.Assert(resp.StatusCode, checker.Equals, 404)
|
||||||
c.Assert(err.Error(), checker.Contains, fmt.Sprintf("getsockopt: connection refused"))
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue