Ensure error don't end in punctuation: ST1005
parent
9403c1ec8e
commit
b81b30ee87
|
@ -192,7 +192,7 @@ func (c *Client) forEachLogEntry(ctx context.Context, tx *bolt.Tx, k []byte, opt
|
|||
|
||||
k, v := cur.Seek(startKey)
|
||||
if !bytes.Equal(k, startKey) {
|
||||
return fmt.Errorf("the first key not the key found in the log bounds. This should be impossible. Please report this error.")
|
||||
return fmt.Errorf("the first key not the key found in the log bounds. This should be impossible. Please report this error")
|
||||
}
|
||||
|
||||
count := 0
|
||||
|
|
|
@ -162,7 +162,7 @@ func encodeSecretKey(orgID platform.ID, k string) ([]byte, error) {
|
|||
func decodeSecretKey(key []byte) (platform.ID, string, error) {
|
||||
if len(key) < platform.IDLength {
|
||||
// This should not happen.
|
||||
return platform.InvalidID(), "", errors.New("provided key is too short to contain an ID. Please report this error.")
|
||||
return platform.InvalidID(), "", errors.New("provided key is too short to contain an ID. Please report this error")
|
||||
}
|
||||
|
||||
var id platform.ID
|
||||
|
|
|
@ -356,7 +356,7 @@ func setSuperAdmin(ctx context.Context, req userRequest, user *chronograf.User)
|
|||
} else if !isSuperAdmin && (user.SuperAdmin != req.SuperAdmin) {
|
||||
// If req.SuperAdmin has been set, and the request was not made with the SuperAdmin
|
||||
// context, return error
|
||||
return fmt.Errorf("user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information.")
|
||||
return fmt.Errorf("user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -354,7 +354,7 @@ func TestService_NewUser(t *testing.T) {
|
|||
},
|
||||
wantStatus: http.StatusUnauthorized,
|
||||
wantContentType: "application/json",
|
||||
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information."}`,
|
||||
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information"}`,
|
||||
},
|
||||
{
|
||||
name: "Create a new SuperAdmin User - as superadmin",
|
||||
|
@ -1264,7 +1264,7 @@ func TestService_UpdateUser(t *testing.T) {
|
|||
id: "1336",
|
||||
wantStatus: http.StatusUnauthorized,
|
||||
wantContentType: "application/json",
|
||||
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information."}`,
|
||||
wantBody: `{"code":401,"message":"user does not have authorization required to set SuperAdmin status. See https://github.com/influxdata/platform/chronograf/issues/2601 for more information"}`,
|
||||
},
|
||||
{
|
||||
name: "Update a Chronograf user to super admin - with super admin context",
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
|
||||
const ServerName = "platform"
|
||||
|
||||
var ErrNoNatsConnection = errors.New("nats connection has not been established. Call Open() first.")
|
||||
var ErrNoNatsConnection = errors.New("nats connection has not been established. Call Open() first")
|
||||
|
||||
// Server wraps a connection to a NATS streaming server
|
||||
type Server struct {
|
||||
|
|
Loading…
Reference in New Issue