mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-13 17:14:05 -08:00
Fix linting errors
Signed-off-by: Raphael Silva <rapphil@gmail.com>
This commit is contained in:
parent
cd5a7b5020
commit
e0c9b2ee19
|
@ -190,7 +190,7 @@ func (m *Manager) Stop() {
|
||||||
|
|
||||||
// Update the rule manager's state as the config requires. If
|
// Update the rule manager's state as the config requires. If
|
||||||
// loading the new rules failed the old rule set is restored.
|
// loading the new rules failed the old rule set is restored.
|
||||||
// This method will no-op in case the manager is already stopped
|
// This method will no-op in case the manager is already stopped.
|
||||||
func (m *Manager) Update(interval time.Duration, files []string, externalLabels labels.Labels, externalURL string, groupEvalIterationFunc GroupEvalIterationFunc) error {
|
func (m *Manager) Update(interval time.Duration, files []string, externalLabels labels.Labels, externalURL string, groupEvalIterationFunc GroupEvalIterationFunc) error {
|
||||||
m.mtx.Lock()
|
m.mtx.Lock()
|
||||||
defer m.mtx.Unlock()
|
defer m.mtx.Unlock()
|
||||||
|
|
|
@ -2111,7 +2111,7 @@ func TestUpdateWhenStopped(t *testing.T) {
|
||||||
require.NotEmpty(t, ruleManager.groups)
|
require.NotEmpty(t, ruleManager.groups)
|
||||||
|
|
||||||
ruleManager.Stop()
|
ruleManager.Stop()
|
||||||
// Updates following a stop are no-op
|
// Updates following a stop are no-op.
|
||||||
err = ruleManager.Update(10*time.Second, []string{}, labels.EmptyLabels(), "", nil)
|
err = ruleManager.Update(10*time.Second, []string{}, labels.EmptyLabels(), "", nil)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue