Validate providers and retain complete run debugging context
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestDockerStatusUsesPublishedHostAddressAndPort(t *testing.T) {
|
||||
t.Setenv("PIPELINES_HOST_IP", "192.0.2.25")
|
||||
t.Setenv("PIPELINES_PUBLIC_PORT", "18080")
|
||||
s := systemStatus(httptest.NewRequest("GET", "http://localhost:8080/connect", nil), time.Now(), nil)
|
||||
if s.Server.URL != "ws://192.0.2.25:18080/connect" || s.Server.Port != "18080" || len(s.Addresses) != 1 || s.Addresses[0].IP != "192.0.2.25" {
|
||||
t.Fatal(s)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user