This commit is contained in:
Héctor Hurtado
2019-10-08 09:20:58 +02:00
parent 56db1ce2ac
commit e32116abad
2 changed files with 9 additions and 76 deletions
+1 -19
View File
@@ -1,4 +1,4 @@
package control
package control_test
import (
"testing"
@@ -6,22 +6,4 @@ import (
func TestNewControlServerFillsTheStructCorrectly(t *testing.T) {
server, err := NewControlServer("0.0.0.0", 8080, "/certfile.pem", "/keyfile.pem")
if err != nil {
}
if server.bindAddr != "0.0.0.0:8080" {
t.Errorf("BindAddress incorrectly composed. Expected: %s, got: %s", "0.0.0.0:8080", server.bindAddr)
}
if server.certfile != "/certfile.pem" {
t.Errorf("BindAddress incorrectly composed. Expected: %s, got: %s", "/certfile.pem", server.certfile)
}
if server.keyfile != "/keyfile.pem" {
t.Errorf("BindAddress incorrectly composed. Expected: %s, got: %s", "/keyfile.pem", server.keyfile)
}
}