Update password generated account IDs (#1290)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2021-06-08 12:31:58 -04:00
1 parent 4d27b58d2d
commit 054c0aa538
20 files changed
+225 -67

No files matched your search

+8 -2
View File
@@ -9,8 +9,8 @@ import (
"github.com/hashicorp/boundary/api/accounts"
"github.com/hashicorp/boundary/api/authmethods"
"github.com/hashicorp/boundary/internal/auth/oidc"
"github.com/hashicorp/boundary/internal/auth/password"
"github.com/hashicorp/boundary/internal/iam"
"github.com/hashicorp/boundary/internal/intglobals"
"github.com/hashicorp/boundary/internal/servers/controller"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -298,7 +298,13 @@ func TestErrors(t *testing.T) {
apiErr = api.AsServerError(err)
require.NotNil(apiErr)
_, err = accountClient.Read(tc.Context(), password.AccountPrefix+"_doesntexis")
_, err = accountClient.Read(tc.Context(), intglobals.OldPasswordAccountPrefix+"_doesntexis")
require.Error(err)
apiErr = api.AsServerError(err)
require.NotNil(apiErr)
assert.EqualValues(http.StatusNotFound, apiErr.Response().StatusCode())
_, err = accountClient.Read(tc.Context(), intglobals.NewPasswordAccountPrefix+"_doesntexis")
require.Error(err)
apiErr = api.AsServerError(err)
require.NotNil(apiErr)