diff --git a/go.mod b/go.mod index 8bc44e242a..f39ef913c3 100644 --- a/go.mod +++ b/go.mod @@ -26,7 +26,7 @@ require ( github.com/hashicorp/go-bexpr v0.1.6 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-hclog v0.15.0 - github.com/hashicorp/go-kms-wrapping v0.6.0 + github.com/hashicorp/go-kms-wrapping v0.6.1 github.com/hashicorp/go-multierror v1.1.0 github.com/hashicorp/go-retryablehttp v0.6.8 github.com/hashicorp/go-uuid v1.0.2 @@ -47,7 +47,7 @@ require ( github.com/mitchellh/mapstructure v1.4.1 github.com/mitchellh/pointerstructure v1.1.1 github.com/mr-tron/base58 v1.2.0 - github.com/oligot/go-mod-upgrade v0.3.0 + github.com/oligot/go-mod-upgrade v0.4.0 github.com/ory/dockertest/v3 v3.6.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/pires/go-proxyproto v0.4.2 diff --git a/go.sum b/go.sum index ee56444791..16fba9d42b 100644 --- a/go.sum +++ b/go.sum @@ -565,8 +565,8 @@ github.com/hashicorp/go-immutable-radix v1.1.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjh github.com/hashicorp/go-kms-wrapping v0.5.12/go.mod h1:yVIWtGOTh/cdGc++/NOlXLus0hJ19Lz4iFrpF6WsZh4= github.com/hashicorp/go-kms-wrapping v0.5.16 h1:7qvB7JYLFART/bt1wafobMU5dDeyseE3ZBKB6UiyxWs= github.com/hashicorp/go-kms-wrapping v0.5.16/go.mod h1:lxD7e9q7ZyCtDEP+tnMevsEvw3M0gmZnneAgv8BaO1Q= -github.com/hashicorp/go-kms-wrapping v0.6.0 h1:+5Qgut40d9V1dQbWO9bKZfBXNPYOuXPh8DJtsjiKlng= -github.com/hashicorp/go-kms-wrapping v0.6.0/go.mod h1:lxD7e9q7ZyCtDEP+tnMevsEvw3M0gmZnneAgv8BaO1Q= +github.com/hashicorp/go-kms-wrapping v0.6.1 h1:QwG2nGi3BXa8xpU5BRWKY5z6Xg1aqAErC9tAvDfMA3Y= +github.com/hashicorp/go-kms-wrapping v0.6.1/go.mod h1:lxD7e9q7ZyCtDEP+tnMevsEvw3M0gmZnneAgv8BaO1Q= github.com/hashicorp/go-kms-wrapping/entropy v0.1.0/go.mod h1:d1g9WGtAunDNpek8jUIEJnBlbgKS1N2Q61QkHiZyR1g= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= @@ -893,8 +893,8 @@ github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/oligot/go-mod-upgrade v0.3.0 h1:WRknnhLEniGMefZGkiqgBpiP3sksLMabJ9f9M6fiR8c= -github.com/oligot/go-mod-upgrade v0.3.0/go.mod h1:A+g8WOzoaH4U5fEk1svHgC7jWi4otz5uF2kMMwpVzzo= +github.com/oligot/go-mod-upgrade v0.4.0 h1:lhibPWeBWp/U3J/kKFNmkp3MMRLdHH1c70uq549N1qU= +github.com/oligot/go-mod-upgrade v0.4.0/go.mod h1:A+g8WOzoaH4U5fEk1svHgC7jWi4otz5uF2kMMwpVzzo= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= diff --git a/internal/auth/password/repository_account.go b/internal/auth/password/repository_account.go index 763b309d64..80b0691122 100644 --- a/internal/auth/password/repository_account.go +++ b/internal/auth/password/repository_account.go @@ -232,7 +232,6 @@ func (r *Repository) UpdateAccount(ctx context.Context, scopeId string, a *Accou } if scopeId == "" { return nil, db.NoRowsAffected, errors.New(errors.InvalidParameter, op, "missing scope id") - } var changeLoginName bool @@ -303,7 +302,6 @@ func (r *Repository) UpdateAccount(ctx context.Context, scopeId string, a *Accou if errors.IsUniqueError(err) { return nil, db.NoRowsAffected, errors.New(errors.NotUnique, op, fmt.Sprintf("name %s already exists: %s", a.Name, a.PublicId)) - } return nil, db.NoRowsAffected, errors.Wrap(err, op, errors.WithMsg(a.PublicId)) } diff --git a/internal/auth/password/repository_account_test.go b/internal/auth/password/repository_account_test.go index 84cf95a7ca..4ce3ad8aca 100644 --- a/internal/auth/password/repository_account_test.go +++ b/internal/auth/password/repository_account_test.go @@ -259,6 +259,7 @@ func TestRepository_CreateAccount(t *testing.T) { }) } } + func TestRepository_CreateAccount_DuplicateNames(t *testing.T) { conn, _ := db.TestSetup(t, "postgres") rw := db.New(conn) @@ -963,7 +964,6 @@ func TestRepository_UpdateAccount(t *testing.T) { } }) } - } func TestRepository_UpdateAccount_DupeNames(t *testing.T) { @@ -1154,5 +1154,4 @@ func TestRepository_UpdateAccount_DupeNames(t *testing.T) { assert.Equal(1, gotCount1, "row count") assert.NoError(db.TestVerifyOplog(t, rw, aa.PublicId, db.WithOperation(oplog.OpType_OP_TYPE_UPDATE), db.WithCreateNotBefore(10*time.Second))) }) - }