Moved to internal

This commit is contained in:
Héctor Hurtado
2019-10-08 08:56:04 +02:00
parent 81379c22e2
commit 7fdef70e39
2 changed files with 0 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
package server_test
import (
"testing"
"github.com/BBVA/kapow/server"
)
func TestStartServerWhenInvalidBindAddrReturnsError(t *testing.T) {
err := server.StartServer("foo;bar", "", "", true)
if err == nil {
t.Errorf("Expected error not found")
}
}
func TestStartServerWhenInvalidPortNumberReturnsError(t *testing.T) {
err := server.StartServer("0.0.0.0:bar", "", "", true)
if err == nil {
t.Errorf("Expected error not found")
}
}
func TestStartServerWhenCertfileDontExistReturnsError(t *testing.T) {
err := server.StartServer("0.0.0.0:8080", "/notExist", "", true)
if err == nil {
t.Errorf("Expected error not found")
}
}
func TestStartServerWhenKeyfileDontExistReturnsError(t *testing.T) {
err := server.StartServer("0.0.0.0:8080", "", "/notExist", true)
if err == nil {
t.Errorf("Expected error not found")
}
}