We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 925c07a commit 5d99287Copy full SHA for 5d99287
config_test.go
@@ -101,6 +101,11 @@ func TestEnvironmentSettingFormat(t *testing.T) {
101
}
102
103
func TestConfig_Port(t *testing.T) {
104
+ defer func() {
105
+ if r := recover(); r == nil {
106
+ t.Errorf("initConfig should panic on invalid port config")
107
+ }
108
+ }()
109
port := config.PublishPort
110
os.Setenv("PUBLISH_PORT", "noNumber")
111
defer os.Unsetenv("PUBLISH_PORT")
@@ -121,6 +126,11 @@ func TestConfig_Addr(t *testing.T) {
121
126
122
127
123
128
func TestConfig_Http_URL(t *testing.T) {
129
130
131
+ t.Errorf("initConfig should panic on invalid url config")
132
133
124
134
url := config.RabbitURL
125
135
os.Setenv("RABBIT_URL", "ftp://test")
136
defer os.Unsetenv("RABBIT_URL")
0 commit comments