testing/e2e: add auth token pagination tests (#4311)
This commit is contained in:
1 parent
0705ed4e68
commit
d47d2ad2e4
2 files changed
+275
No files matched your search
@@ -0,0 +1,25 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package boundary
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/api"
|
||||
"github.com/hashicorp/boundary/api/authmethods"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// CreateNewAuthMethodApi creates a new auth method using the Go api.
|
||||
// Returns the id of the new auth method
|
||||
func CreateNewAuthMethodApi(t testing.TB, ctx context.Context, client *api.Client, scopeId string) string {
|
||||
aClient := authmethods.NewClient(client)
|
||||
newAMResult, err := aClient.Create(ctx, "password", scopeId)
|
||||
require.NoError(t, err)
|
||||
|
||||
authMethodId := newAMResult.Item.Id
|
||||
t.Logf("Created Auth Method: %s", authMethodId)
|
||||
return authMethodId
|
||||
}
|
||||
Reference in new issue
Block a user