testing/e2e: paginate managed groups (#4315)
This commit is contained in:
1 parent
0bddb346e5
commit
7fe9198bce
3 files changed
+250
-1
No files matched your search
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
// CreateNewAuthMethodApi creates a new auth method using the Go api.
|
||||
// CreateNewAuthMethodApi creates a new password 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)
|
||||
@@ -23,3 +23,19 @@ func CreateNewAuthMethodApi(t testing.TB, ctx context.Context, client *api.Clien
|
||||
t.Logf("Created Auth Method: %s", authMethodId)
|
||||
return authMethodId
|
||||
}
|
||||
|
||||
// CreateNewOidcAuthMethodApi creates a new oidc auth method using the Go api.
|
||||
// Returns the id of the new auth method
|
||||
func CreateNewOidcAuthMethodApi(t testing.TB, ctx context.Context, client *api.Client, scopeId string) string {
|
||||
aClient := authmethods.NewClient(client)
|
||||
newAMResult, err := aClient.Create(ctx, "oidc", scopeId,
|
||||
authmethods.WithOidcAuthMethodApiUrlPrefix("https://some_url_prefix"),
|
||||
authmethods.WithOidcAuthMethodClientId("some_client_id"),
|
||||
authmethods.WithOidcAuthMethodClientSecret("some_client_secret"),
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
authMethodId := newAMResult.Item.Id
|
||||
t.Logf("Created Auth Method: %s", authMethodId)
|
||||
return authMethodId
|
||||
}
|
||||
Reference in new issue
Block a user