Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kbudde committed Apr 8, 2018
1 parent 925c07a commit 5d99287
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ func TestEnvironmentSettingFormat(t *testing.T) {
}

func TestConfig_Port(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("initConfig should panic on invalid port config")
}
}()
port := config.PublishPort
os.Setenv("PUBLISH_PORT", "noNumber")
defer os.Unsetenv("PUBLISH_PORT")
Expand All @@ -121,6 +126,11 @@ func TestConfig_Addr(t *testing.T) {
}

func TestConfig_Http_URL(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("initConfig should panic on invalid url config")
}
}()
url := config.RabbitURL
os.Setenv("RABBIT_URL", "ftp://test")
defer os.Unsetenv("RABBIT_URL")
Expand Down

0 comments on commit 5d99287

Please sign in to comment.