chore: homogeneous tests setup and close servers. (#1520)
This commit is contained in:
parent
15f3a45342
commit
e719fabe96
54 changed files with 371 additions and 387 deletions
|
@ -18,8 +18,7 @@ import (
|
|||
)
|
||||
|
||||
func TestChallenge(t *testing.T) {
|
||||
_, apiURL, tearDown := tester.SetupFakeAPI()
|
||||
defer tearDown()
|
||||
_, apiURL := tester.SetupFakeAPI(t)
|
||||
|
||||
providerServer := NewProviderServer("", "23457")
|
||||
|
||||
|
@ -71,8 +70,7 @@ func TestChallenge(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestChallengeInvalidPort(t *testing.T) {
|
||||
_, apiURL, tearDown := tester.SetupFakeAPI()
|
||||
defer tearDown()
|
||||
_, apiURL := tester.SetupFakeAPI(t)
|
||||
|
||||
privateKey, err := rsa.GenerateKey(rand.Reader, 128)
|
||||
require.NoError(t, err, "Could not generate test key")
|
||||
|
@ -255,8 +253,7 @@ func TestChallengeWithProxy(t *testing.T) {
|
|||
func testServeWithProxy(t *testing.T, header, extra *testProxyHeader, expectError bool) {
|
||||
t.Helper()
|
||||
|
||||
_, apiURL, tearDown := tester.SetupFakeAPI()
|
||||
defer tearDown()
|
||||
_, apiURL := tester.SetupFakeAPI(t)
|
||||
|
||||
providerServer := NewProviderServer("localhost", "23457")
|
||||
if header != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue