diff --git a/internal/utclient/client.go b/internal/utclient/client.go index 7bc5db4904..61b9e20432 100644 --- a/internal/utclient/client.go +++ b/internal/utclient/client.go @@ -66,7 +66,7 @@ func (c *httpClient) Get(ctx context.Context, path string) (*http.Response, erro // UpdateVisorUptime updates visor uptime. func (c *httpClient) UpdateVisorUptime(ctx context.Context) error { - resp, err := c.Get(ctx, "/update") + resp, err := c.Get(ctx, "/v2/update") if err != nil { return err } diff --git a/internal/utclient/client_test.go b/internal/utclient/client_test.go index 0a58b1b65a..81a00cd3ae 100644 --- a/internal/utclient/client_test.go +++ b/internal/utclient/client_test.go @@ -70,7 +70,7 @@ func TestUpdateVisorUptime(t *testing.T) { err = c.UpdateVisorUptime(context.TODO()) require.NoError(t, err) - assert.Equal(t, "/update", <-urlCh) + assert.Equal(t, "/v2/update", <-urlCh) } func authHandler(next http.Handler) http.Handler { diff --git a/internal/utclient/mock_api_client.go b/internal/utclient/mock_api_client.go index 42f06f07b2..8252bd4924 100644 --- a/internal/utclient/mock_api_client.go +++ b/internal/utclient/mock_api_client.go @@ -2,11 +2,8 @@ package utclient -import ( - context "context" - - mock "github.com/stretchr/testify/mock" -) +import context "context" +import mock "github.com/stretchr/testify/mock" // MockAPIClient is an autogenerated mock type for the APIClient type type MockAPIClient struct { diff --git a/pkg/app/appevent/mock_rpc_client.go b/pkg/app/appevent/mock_rpc_client.go index c73a4321ee..56264a8e18 100644 --- a/pkg/app/appevent/mock_rpc_client.go +++ b/pkg/app/appevent/mock_rpc_client.go @@ -2,13 +2,9 @@ package appevent -import ( - context "context" - - mock "github.com/stretchr/testify/mock" - - appcommon "github.com/SkycoinProject/skywire-mainnet/pkg/app/appcommon" -) +import appcommon "github.com/SkycoinProject/skywire-mainnet/pkg/app/appcommon" +import context "context" +import mock "github.com/stretchr/testify/mock" // MockRPCClient is an autogenerated mock type for the RPCClient type type MockRPCClient struct { diff --git a/pkg/visor/init.go b/pkg/visor/init.go index f91b766f6d..ef9236b81a 100644 --- a/pkg/visor/init.go +++ b/pkg/visor/init.go @@ -416,7 +416,7 @@ func initHypervisors(v *Visor) bool { } func initUptimeTracker(v *Visor) bool { - const tickDuration = time.Second + const tickDuration = 10 * time.Second report := v.makeReporter("uptime_tracker") conf := v.conf.UptimeTracker