Migrate user name to login name (#255)
This commit is contained in:
1 parent
6f886976e4
commit
4cfab04307
50 files changed
+528
-527
No files matched your search
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/hashicorp/boundary/api/authmethods"
|
||||
"github.com/hashicorp/boundary/internal/servers/controller"
|
||||
"github.com/kr/pretty"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -16,7 +17,7 @@ func TestAuthenticate(t *testing.T) {
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
DefaultUsername: "user",
|
||||
DefaultLoginName: "user",
|
||||
DefaultPassword: "passpass",
|
||||
})
|
||||
defer tc.Shutdown()
|
||||
@@ -26,7 +27,7 @@ func TestAuthenticate(t *testing.T) {
|
||||
|
||||
tok, apiErr, err := methods.Authenticate(tc.Context(), amId, "user", "passpass")
|
||||
require.NoError(err)
|
||||
assert.Nil(apiErr)
|
||||
assert.Nil(apiErr, pretty.Sprint(apiErr))
|
||||
assert.NotNil(tok)
|
||||
|
||||
_, apiErr, err = methods.Authenticate(tc.Context(), amId, "user", "wrong")
|
||||
|
||||
Reference in new issue
Block a user