Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Trojan295 committed Sep 17, 2024
1 parent 52409b9 commit 8448b38
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
const (
KeepAliveDefault = 10 * time.Second
KeepAliveTimeoutDefault = time.Minute
HealthAddressDefault = ":9091"
)

type Config struct {
Expand Down Expand Up @@ -121,7 +122,7 @@ func Get() Config {
}

if cfg.HealthAddress == "" {
cfg.HealthAddress = ":9091"
cfg.HealthAddress = HealthAddressDefault
}

return *cfg
Expand Down
1 change: 1 addition & 0 deletions internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func TestConfig(t *testing.T) {
},
KeepAlive: KeepAliveDefault,
KeepAliveTimeout: KeepAliveTimeoutDefault,
HealthAddress: HealthAddressDefault,
}

got := Get()
Expand Down
2 changes: 1 addition & 1 deletion internal/proxy/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{
Expand Down

0 comments on commit 8448b38

Please sign in to comment.