Files
threshold/testing/internal/e2e/boundary/boundary.go
T
Michael Li 600a2dff24 test(e2e): Add rate limit test (#4135) (#4143)
* test(e2e): Add rate limit test (#4135)

(cherry picked from commit 9bf350d622a14ea39feaca29861c738a5deff9bb)

* test(e2e): Modify rate limit test due to timing issues (#4145)

The rate limit test was running into failures due to some hard-coded assumptions (waiting for a command to last longer than 3 seconds to determine if the CLI auto-retried). This change makes it more resilient.

(cherry picked from commit 3535f15922c37fda5457f02cf8ae894203359042)
2023-12-13 10:17:04 -05:00

47 lines
1.3 KiB
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
// Package boundary provides methods for commonly used boundary actions that are used in end-to-end tests.
package boundary
import (
"github.com/hashicorp/boundary/api/authmethods"
)
// ConnectCliOutput parses the json response from running `boundary connect`
type ConnectCliOutput struct {
Port int `json:"port"`
Address string `json:"address"`
}
// AuthenticateCliOutput parses the json response from running `boundary authenticate`
type AuthenticateCliOutput struct {
Item *authmethods.AuthenticateResult
StatusCode int `json:"status_code"`
}
// AuthMethodInfo parses auth method info in the json response from running `boundary database init`
type AuthMethodInfo struct {
AuthMethodId string `json:"auth_method_id"`
LoginName string `json:"login_name"`
Password string `json:"password"`
}
// DbInitInfo parses the json response from running `boundary database init`
type DbInitInfo struct {
AuthMethod AuthMethodInfo `json:"auth_method"`
}
// CliError parses the Stderr from running a boundary command
type CliError struct {
Status int `json:"status_code"`
}
type HttpResponseBody struct {
Attributes HttpResponseBodyAttributes `json:"attributes"`
}
type HttpResponseBodyAttributes struct {
Token string `json:"token"`
}