Skip to content

Commit d9c0b5d

Browse files
committed
.
1 parent 407231c commit d9c0b5d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

proxy/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func LoadConfigFromReader(r io.Reader) (Config, error) {
207207

208208
// enforce ${PORT} used in both cmd and proxy
209209
if !strings.Contains(modelConfig.Cmd, "${PORT}") && strings.Contains(modelConfig.Proxy, "${PORT}") {
210-
return Config{}, fmt.Errorf("model %s requires a proxy value when not using automatic ${PORT}", modelId)
210+
return Config{}, fmt.Errorf("model %s: proxy uses ${PORT} but cmd does not - ${PORT} is only available when used in cmd", modelId)
211211
}
212212

213213
// go through model config fields: cmd, cmdStop, proxy, checkEndPoint and replace macros with macro values

proxy/config_posix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestConfig_SanitizeCommand(t *testing.T) {
4444

4545
// Test the default values are automatically set for global, model and group configurations
4646
// after loading the configuration
47-
func TestConfig_DefaultValues(t *testing.T) {
47+
func TestConfig_DefaultValuesPosix(t *testing.T) {
4848
content := `
4949
models:
5050
model1:

proxy/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ models:
336336
cmd: svr --port 111
337337
`
338338
_, err := LoadConfigFromReader(strings.NewReader(content))
339-
assert.Equal(t, "model model1 requires a proxy value when not using automatic ${PORT}", err.Error())
339+
assert.Equal(t, "model model1: proxy uses ${PORT} but cmd does not - ${PORT} is only available when used in cmd", err.Error())
340340
})
341341
}
342342

0 commit comments

Comments
 (0)