Removes Load function from params to enable commands to load grouped parameters individually and have better control over errors.
Standardize loading error message across all requests.
Improve loading params for fileexperts command.
Improve loading params for heartbeat command.
Replace all occurences of assert.True(t, errors.As(err, &errapi)) with assert.ErrorAs(t, err, &errapi).
At heartbeat command check if error is api.ErrAuth to correctly save heartbeats to offline db.
Simplify how heartbeat command handle errors by using its internal wakaerror.Error.
At params.LoadOfflineParams() if argument sync-offline-activity is less than zero won't be considered an error and instead will log as warn and set Offline.SyncMax to zero.
Add unit test to validate if read from vault errored.
Improve tests for api key parsing.
Add TestSendHeartbeats_ErrAuth_InvalidAPIKEY as integration test to validate if an invalid api key will make heartbeats to be saved to offline db.
This PR does the following:
Load
function from params to enable commands to load grouped parameters individually and have better control over errors.fileexperts
command.heartbeat
command.assert.True(t, errors.As(err, &errapi))
withassert.ErrorAs(t, err, &errapi)
.api.ErrAuth
to correctly save heartbeats to offline db.wakaerror.Error
.params.LoadOfflineParams()
if argumentsync-offline-activity
is less than zero won't be considered an error and instead will log as warn and setOffline.SyncMax
to zero.TestSendHeartbeats_ErrAuth_InvalidAPIKEY
as integration test to validate if an invalid api key will make heartbeats to be saved to offline db.