mirror of
https://github.com/grafana/grafana.git
synced 2026-08-26 21:37:31 -05:00
Chore: a bit of spring cleaning (#16710)
* Chore: use early return technic everywhere And enable "indent-error-flow" revive rule * Chore: remove if-return rule from revive config * Chore: improve error messages And enable "error-strings" revive rule * Chore: enable "error-naming" revive rule * Chore: make linter happy * Chore: do not duplicate gofmt execution * Chore: make linter happy * Chore: address the pull review comments
This commit is contained in:
@@ -5,12 +5,12 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
|
||||
"github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
var ProvokedError = errors.New("testing error.")
|
||||
var ErrProvokedError = errors.New("testing error")
|
||||
|
||||
func TestTransaction(t *testing.T) {
|
||||
ss := InitTestDB(t)
|
||||
@@ -42,10 +42,10 @@ func TestTransaction(t *testing.T) {
|
||||
return err
|
||||
}
|
||||
|
||||
return ProvokedError
|
||||
return ErrProvokedError
|
||||
})
|
||||
|
||||
So(err, ShouldEqual, ProvokedError)
|
||||
So(err, ShouldEqual, ErrProvokedError)
|
||||
|
||||
query := &models.GetApiKeyByIdQuery{ApiKeyId: cmd.Result.Id}
|
||||
err = GetApiKeyById(query)
|
||||
|
||||
Reference in New Issue
Block a user