diff --git a/internal/config/config.go b/internal/config/config.go index 8ba6400..ee6b306 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -11,6 +11,7 @@ import ( const ( KeepAliveDefault = 10 * time.Second KeepAliveTimeoutDefault = time.Minute + HealthAddressDefault = ":9091" ) type Config struct { @@ -121,7 +122,7 @@ func Get() Config { } if cfg.HealthAddress == "" { - cfg.HealthAddress = ":9091" + cfg.HealthAddress = HealthAddressDefault } return *cfg diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 69df649..d58bcf7 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -47,6 +47,7 @@ func TestConfig(t *testing.T) { }, KeepAlive: KeepAliveDefault, KeepAliveTimeout: KeepAliveTimeoutDefault, + HealthAddress: HealthAddressDefault, } got := Get() diff --git a/internal/proxy/client_test.go b/internal/proxy/client_test.go index 0a1c446..4a459d3 100644 --- a/internal/proxy/client_test.go +++ b/internal/proxy/client_test.go @@ -444,7 +444,7 @@ func TestClient_run(t *testing.T) { m.EXPECT().Context().Return(context.Background()).AnyTimes() // expected 0 or 1 times }, }, - wantLastSeenUpdated: true, + wantLastSeenUpdated: false, wantErr: true, }, {