mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
e91136338a
commit
d09f5abec9
@ -82,10 +82,16 @@ func (s CorrelationsService) deleteCorrelation(ctx context.Context, cmd DeleteCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
deletedCount, err := session.Delete(&Correlation{UID: cmd.UID, SourceUID: cmd.SourceUID})
|
deletedCount, err := session.Delete(&Correlation{UID: cmd.UID, SourceUID: cmd.SourceUID})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if deletedCount == 0 {
|
if deletedCount == 0 {
|
||||||
return ErrCorrelationNotFound
|
return ErrCorrelationNotFound
|
||||||
}
|
}
|
||||||
return err
|
|
||||||
|
return nil
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -142,10 +148,16 @@ func (s CorrelationsService) updateCorrelation(ctx context.Context, cmd UpdateCo
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateCount, err := session.Where("uid = ? AND source_uid = ?", correlation.UID, correlation.SourceUID).Limit(1).Update(correlation)
|
updateCount, err := session.Where("uid = ? AND source_uid = ?", correlation.UID, correlation.SourceUID).Limit(1).Update(correlation)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
if updateCount == 0 {
|
if updateCount == 0 {
|
||||||
return ErrCorrelationNotFound
|
return ErrCorrelationNotFound
|
||||||
}
|
}
|
||||||
return err
|
|
||||||
|
return nil
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -16,8 +16,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestIntegrationUpdateCorrelation(t *testing.T) {
|
func TestIntegrationUpdateCorrelation(t *testing.T) {
|
||||||
// TODO: #82520 Possibly a flaky test
|
|
||||||
t.Skip()
|
|
||||||
if testing.Short() {
|
if testing.Short() {
|
||||||
t.Skip("skipping integration test")
|
t.Skip("skipping integration test")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user