Documentation
¶
Index ¶
- func Exec(t *testing.T, env *TestEnv, args ...string) (stdout, stderr string, err error)
- func FakeJWT(t *testing.T, claims map[string]any) string
- func FindContextEntry(t *testing.T, path, name string) *config.ContextEntry
- func WriteConfigFile(t *testing.T, dir string, content map[string]any) string
- func WriteContextConfigFile(t *testing.T, dir, currentContext string, ...) string
- func WriteYAMLConfigFile(t *testing.T, dir string, content map[string]any) string
- type FakeAccountService
- func (f *FakeAccountService) CreateAccountInvite(ctx context.Context, req *accountv1.CreateAccountInviteRequest) (*accountv1.CreateAccountInviteResponse, error)
- func (f *FakeAccountService) DeleteAccountInvite(ctx context.Context, req *accountv1.DeleteAccountInviteRequest) (*accountv1.DeleteAccountInviteResponse, error)
- func (f *FakeAccountService) GetAccount(ctx context.Context, req *accountv1.GetAccountRequest) (*accountv1.GetAccountResponse, error)
- func (f *FakeAccountService) GetAccountInvite(ctx context.Context, req *accountv1.GetAccountInviteRequest) (*accountv1.GetAccountInviteResponse, error)
- func (f *FakeAccountService) GetAccountMember(ctx context.Context, req *accountv1.GetAccountMemberRequest) (*accountv1.GetAccountMemberResponse, error)
- func (f *FakeAccountService) ListAccountInvites(ctx context.Context, req *accountv1.ListAccountInvitesRequest) (*accountv1.ListAccountInvitesResponse, error)
- func (f *FakeAccountService) ListAccountMembers(ctx context.Context, req *accountv1.ListAccountMembersRequest) (*accountv1.ListAccountMembersResponse, error)
- func (f *FakeAccountService) ListAccounts(ctx context.Context, req *accountv1.ListAccountsRequest) (*accountv1.ListAccountsResponse, error)
- func (f *FakeAccountService) UpdateAccount(ctx context.Context, req *accountv1.UpdateAccountRequest) (*accountv1.UpdateAccountResponse, error)
- type FakeAuthService
- func (f *FakeAuthService) CreateManagementKey(ctx context.Context, req *authv1.CreateManagementKeyRequest) (*authv1.CreateManagementKeyResponse, error)
- func (f *FakeAuthService) DeleteManagementKey(ctx context.Context, req *authv1.DeleteManagementKeyRequest) (*authv1.DeleteManagementKeyResponse, error)
- func (f *FakeAuthService) ListManagementKeys(ctx context.Context, req *authv1.ListManagementKeysRequest) (*authv1.ListManagementKeysResponse, error)
- type FakeBackupService
- func (f *FakeBackupService) CreateBackup(ctx context.Context, req *backupv1.CreateBackupRequest) (*backupv1.CreateBackupResponse, error)
- func (f *FakeBackupService) CreateBackupSchedule(ctx context.Context, req *backupv1.CreateBackupScheduleRequest) (*backupv1.CreateBackupScheduleResponse, error)
- func (f *FakeBackupService) DeleteBackup(ctx context.Context, req *backupv1.DeleteBackupRequest) (*backupv1.DeleteBackupResponse, error)
- func (f *FakeBackupService) DeleteBackupSchedule(ctx context.Context, req *backupv1.DeleteBackupScheduleRequest) (*backupv1.DeleteBackupScheduleResponse, error)
- func (f *FakeBackupService) GetBackup(ctx context.Context, req *backupv1.GetBackupRequest) (*backupv1.GetBackupResponse, error)
- func (f *FakeBackupService) GetBackupSchedule(ctx context.Context, req *backupv1.GetBackupScheduleRequest) (*backupv1.GetBackupScheduleResponse, error)
- func (f *FakeBackupService) ListBackupRestores(ctx context.Context, req *backupv1.ListBackupRestoresRequest) (*backupv1.ListBackupRestoresResponse, error)
- func (f *FakeBackupService) ListBackupSchedules(ctx context.Context, req *backupv1.ListBackupSchedulesRequest) (*backupv1.ListBackupSchedulesResponse, error)
- func (f *FakeBackupService) ListBackups(ctx context.Context, req *backupv1.ListBackupsRequest) (*backupv1.ListBackupsResponse, error)
- func (f *FakeBackupService) RestoreBackup(ctx context.Context, req *backupv1.RestoreBackupRequest) (*backupv1.RestoreBackupResponse, error)
- func (f *FakeBackupService) UpdateBackupSchedule(ctx context.Context, req *backupv1.UpdateBackupScheduleRequest) (*backupv1.UpdateBackupScheduleResponse, error)
- type FakeBookingService
- func (f *FakeBookingService) GetPackage(ctx context.Context, req *bookingv1.GetPackageRequest) (*bookingv1.GetPackageResponse, error)
- func (f *FakeBookingService) ListGlobalInferenceModels(ctx context.Context, req *bookingv1.ListGlobalInferenceModelsRequest) (*bookingv1.ListGlobalInferenceModelsResponse, error)
- func (f *FakeBookingService) ListGlobalPackages(ctx context.Context, req *bookingv1.ListGlobalPackagesRequest) (*bookingv1.ListGlobalPackagesResponse, error)
- func (f *FakeBookingService) ListPackages(ctx context.Context, req *bookingv1.ListPackagesRequest) (*bookingv1.ListPackagesResponse, error)
- type FakeClusterService
- func (f *FakeClusterService) CreateCluster(ctx context.Context, req *clusterv1.CreateClusterRequest) (*clusterv1.CreateClusterResponse, error)
- func (f *FakeClusterService) CreateClusterFromBackup(ctx context.Context, req *clusterv1.CreateClusterFromBackupRequest) (*clusterv1.CreateClusterFromBackupResponse, error)
- func (f *FakeClusterService) DeleteCluster(ctx context.Context, req *clusterv1.DeleteClusterRequest) (*clusterv1.DeleteClusterResponse, error)
- func (f *FakeClusterService) GetCluster(ctx context.Context, req *clusterv1.GetClusterRequest) (*clusterv1.GetClusterResponse, error)
- func (f *FakeClusterService) GetClusterDownscaleRisk(ctx context.Context, req *clusterv1.GetClusterDownscaleRiskRequest) (*clusterv1.GetClusterDownscaleRiskResponse, error)
- func (f *FakeClusterService) ListClusters(ctx context.Context, req *clusterv1.ListClustersRequest) (*clusterv1.ListClustersResponse, error)
- func (f *FakeClusterService) ListQdrantReleases(ctx context.Context, req *clusterv1.ListQdrantReleasesRequest) (*clusterv1.ListQdrantReleasesResponse, error)
- func (f *FakeClusterService) RestartCluster(ctx context.Context, req *clusterv1.RestartClusterRequest) (*clusterv1.RestartClusterResponse, error)
- func (f *FakeClusterService) SuggestClusterName(ctx context.Context, req *clusterv1.SuggestClusterNameRequest) (*clusterv1.SuggestClusterNameResponse, error)
- func (f *FakeClusterService) SuspendCluster(ctx context.Context, req *clusterv1.SuspendClusterRequest) (*clusterv1.SuspendClusterResponse, error)
- func (f *FakeClusterService) UnsuspendCluster(ctx context.Context, req *clusterv1.UnsuspendClusterRequest) (*clusterv1.UnsuspendClusterResponse, error)
- func (f *FakeClusterService) UpdateCluster(ctx context.Context, req *clusterv1.UpdateClusterRequest) (*clusterv1.UpdateClusterResponse, error)
- type FakeDatabaseApiKeyService
- func (f *FakeDatabaseApiKeyService) CreateDatabaseApiKey(ctx context.Context, req *clusterauthv2.CreateDatabaseApiKeyRequest) (*clusterauthv2.CreateDatabaseApiKeyResponse, error)
- func (f *FakeDatabaseApiKeyService) DeleteDatabaseApiKey(ctx context.Context, req *clusterauthv2.DeleteDatabaseApiKeyRequest) (*clusterauthv2.DeleteDatabaseApiKeyResponse, error)
- func (f *FakeDatabaseApiKeyService) ListDatabaseApiKeys(ctx context.Context, req *clusterauthv2.ListDatabaseApiKeysRequest) (*clusterauthv2.ListDatabaseApiKeysResponse, error)
- type FakeHybridService
- func (f *FakeHybridService) CreateHybridCloudEnvironment(ctx context.Context, req *hybridv1.CreateHybridCloudEnvironmentRequest) (*hybridv1.CreateHybridCloudEnvironmentResponse, error)
- func (f *FakeHybridService) DeleteHybridCloudEnvironment(ctx context.Context, req *hybridv1.DeleteHybridCloudEnvironmentRequest) (*hybridv1.DeleteHybridCloudEnvironmentResponse, error)
- func (f *FakeHybridService) GenerateBootstrapCommands(ctx context.Context, req *hybridv1.GenerateBootstrapCommandsRequest) (*hybridv1.GenerateBootstrapCommandsResponse, error)
- func (f *FakeHybridService) GetHybridCloudEnvironment(ctx context.Context, req *hybridv1.GetHybridCloudEnvironmentRequest) (*hybridv1.GetHybridCloudEnvironmentResponse, error)
- func (f *FakeHybridService) ListHybridCloudEnvironments(ctx context.Context, req *hybridv1.ListHybridCloudEnvironmentsRequest) (*hybridv1.ListHybridCloudEnvironmentsResponse, error)
- func (f *FakeHybridService) UpdateHybridCloudEnvironment(ctx context.Context, req *hybridv1.UpdateHybridCloudEnvironmentRequest) (*hybridv1.UpdateHybridCloudEnvironmentResponse, error)
- type FakeIAMService
- func (f *FakeIAMService) AssignUserRoles(ctx context.Context, req *iamv1.AssignUserRolesRequest) (*iamv1.AssignUserRolesResponse, error)
- func (f *FakeIAMService) CreateRole(ctx context.Context, req *iamv1.CreateRoleRequest) (*iamv1.CreateRoleResponse, error)
- func (f *FakeIAMService) DeleteRole(ctx context.Context, req *iamv1.DeleteRoleRequest) (*iamv1.DeleteRoleResponse, error)
- func (f *FakeIAMService) DeleteUser(ctx context.Context, req *iamv1.DeleteUserRequest) (*iamv1.DeleteUserResponse, error)
- func (f *FakeIAMService) GetAuthenticatedUser(ctx context.Context, req *iamv1.GetAuthenticatedUserRequest) (*iamv1.GetAuthenticatedUserResponse, error)
- func (f *FakeIAMService) GetRole(ctx context.Context, req *iamv1.GetRoleRequest) (*iamv1.GetRoleResponse, error)
- func (f *FakeIAMService) ListPermissions(ctx context.Context, req *iamv1.ListPermissionsRequest) (*iamv1.ListPermissionsResponse, error)
- func (f *FakeIAMService) ListRoles(ctx context.Context, req *iamv1.ListRolesRequest) (*iamv1.ListRolesResponse, error)
- func (f *FakeIAMService) ListUserRoles(ctx context.Context, req *iamv1.ListUserRolesRequest) (*iamv1.ListUserRolesResponse, error)
- func (f *FakeIAMService) ListUsers(ctx context.Context, req *iamv1.ListUsersRequest) (*iamv1.ListUsersResponse, error)
- func (f *FakeIAMService) UpdateRole(ctx context.Context, req *iamv1.UpdateRoleRequest) (*iamv1.UpdateRoleResponse, error)
- type FakeMonitoringService
- func (f *FakeMonitoringService) GetClusterLogs(ctx context.Context, req *monitoringv1.GetClusterLogsRequest) (*monitoringv1.GetClusterLogsResponse, error)
- func (f *FakeMonitoringService) GetClusterSummaryMetrics(ctx context.Context, req *monitoringv1.GetClusterSummaryMetricsRequest) (*monitoringv1.GetClusterSummaryMetricsResponse, error)
- func (f *FakeMonitoringService) GetClusterUsageMetrics(ctx context.Context, req *monitoringv1.GetClusterUsageMetricsRequest) (*monitoringv1.GetClusterUsageMetricsResponse, error)
- func (f *FakeMonitoringService) ListClusterAlerts(ctx context.Context, req *monitoringv1.ListClusterAlertsRequest) (*monitoringv1.ListClusterAlertsResponse, error)
- type FakeOAuthServer
- type FakePlatformService
- func (f *FakePlatformService) ListCloudProviderRegions(ctx context.Context, req *platformv1.ListCloudProviderRegionsRequest) (*platformv1.ListCloudProviderRegionsResponse, error)
- func (f *FakePlatformService) ListCloudProviders(ctx context.Context, req *platformv1.ListCloudProvidersRequest) (*platformv1.ListCloudProvidersResponse, error)
- type FakeServerlessBackupService
- func (f *FakeServerlessBackupService) CreateBackup(ctx context.Context, req *spacebackupv1.CreateBackupRequest) (*spacebackupv1.CreateBackupResponse, error)
- func (f *FakeServerlessBackupService) CreateBackupSchedule(ctx context.Context, req *spacebackupv1.CreateBackupScheduleRequest) (*spacebackupv1.CreateBackupScheduleResponse, error)
- func (f *FakeServerlessBackupService) DeleteBackup(ctx context.Context, req *spacebackupv1.DeleteBackupRequest) (*spacebackupv1.DeleteBackupResponse, error)
- func (f *FakeServerlessBackupService) DeleteBackupSchedule(ctx context.Context, req *spacebackupv1.DeleteBackupScheduleRequest) (*spacebackupv1.DeleteBackupScheduleResponse, error)
- func (f *FakeServerlessBackupService) GetBackup(ctx context.Context, req *spacebackupv1.GetBackupRequest) (*spacebackupv1.GetBackupResponse, error)
- func (f *FakeServerlessBackupService) GetBackupSchedule(ctx context.Context, req *spacebackupv1.GetBackupScheduleRequest) (*spacebackupv1.GetBackupScheduleResponse, error)
- func (f *FakeServerlessBackupService) ListBackupRestores(ctx context.Context, req *spacebackupv1.ListBackupRestoresRequest) (*spacebackupv1.ListBackupRestoresResponse, error)
- func (f *FakeServerlessBackupService) ListBackupSchedules(ctx context.Context, req *spacebackupv1.ListBackupSchedulesRequest) (*spacebackupv1.ListBackupSchedulesResponse, error)
- func (f *FakeServerlessBackupService) ListBackups(ctx context.Context, req *spacebackupv1.ListBackupsRequest) (*spacebackupv1.ListBackupsResponse, error)
- func (f *FakeServerlessBackupService) RestoreBackup(ctx context.Context, req *spacebackupv1.RestoreBackupRequest) (*spacebackupv1.RestoreBackupResponse, error)
- func (f *FakeServerlessBackupService) UpdateBackupSchedule(ctx context.Context, req *spacebackupv1.UpdateBackupScheduleRequest) (*spacebackupv1.UpdateBackupScheduleResponse, error)
- type FakeServerlessMonitoringService
- func (f *FakeServerlessMonitoringService) GetSpaceInferenceMetrics(ctx context.Context, ...) (*serverlessmonitoringv1.GetSpaceInferenceMetricsResponse, error)
- func (f *FakeServerlessMonitoringService) GetSpaceSummaryMetrics(ctx context.Context, req *serverlessmonitoringv1.GetSpaceSummaryMetricsRequest) (*serverlessmonitoringv1.GetSpaceSummaryMetricsResponse, error)
- func (f *FakeServerlessMonitoringService) GetSpaceUsageMetrics(ctx context.Context, req *serverlessmonitoringv1.GetSpaceUsageMetricsRequest) (*serverlessmonitoringv1.GetSpaceUsageMetricsResponse, error)
- func (f *FakeServerlessMonitoringService) ListSpaceAlerts(ctx context.Context, req *serverlessmonitoringv1.ListSpaceAlertsRequest) (*serverlessmonitoringv1.ListSpaceAlertsResponse, error)
- type FakeServerlessPlatformService
- func (f *FakeServerlessPlatformService) GetCloudRegion(ctx context.Context, req *serverlessplatformv1.GetCloudRegionRequest) (*serverlessplatformv1.GetCloudRegionResponse, error)
- func (f *FakeServerlessPlatformService) ListCloudRegions(ctx context.Context, req *serverlessplatformv1.ListCloudRegionsRequest) (*serverlessplatformv1.ListCloudRegionsResponse, error)
- type FakeServerlessQuotaService
- type FakeServerlessSpaceApiKeyService
- func (f *FakeServerlessSpaceApiKeyService) CreateSpaceApiKey(ctx context.Context, req *spaceauthv1.CreateSpaceApiKeyRequest) (*spaceauthv1.CreateSpaceApiKeyResponse, error)
- func (f *FakeServerlessSpaceApiKeyService) DeleteSpaceApiKey(ctx context.Context, req *spaceauthv1.DeleteSpaceApiKeyRequest) (*spaceauthv1.DeleteSpaceApiKeyResponse, error)
- func (f *FakeServerlessSpaceApiKeyService) ListSpaceApiKeys(ctx context.Context, req *spaceauthv1.ListSpaceApiKeysRequest) (*spaceauthv1.ListSpaceApiKeysResponse, error)
- type FakeServerlessSpaceService
- func (f *FakeServerlessSpaceService) CreateSpace(ctx context.Context, req *spacev1.CreateSpaceRequest) (*spacev1.CreateSpaceResponse, error)
- func (f *FakeServerlessSpaceService) CreateSpaceFromBackup(ctx context.Context, req *spacev1.CreateSpaceFromBackupRequest) (*spacev1.CreateSpaceFromBackupResponse, error)
- func (f *FakeServerlessSpaceService) DeleteSpace(ctx context.Context, req *spacev1.DeleteSpaceRequest) (*spacev1.DeleteSpaceResponse, error)
- func (f *FakeServerlessSpaceService) GetSpace(ctx context.Context, req *spacev1.GetSpaceRequest) (*spacev1.GetSpaceResponse, error)
- func (f *FakeServerlessSpaceService) ListSpaces(ctx context.Context, req *spacev1.ListSpacesRequest) (*spacev1.ListSpacesResponse, error)
- func (f *FakeServerlessSpaceService) SuggestSpaceName(ctx context.Context, req *spacev1.SuggestSpaceNameRequest) (*spacev1.SuggestSpaceNameResponse, error)
- func (f *FakeServerlessSpaceService) UpdateSpace(ctx context.Context, req *spacev1.UpdateSpaceRequest) (*spacev1.UpdateSpaceResponse, error)
- type MethodSpy
- func (m *MethodSpy[Req, Resp]) All() []Req
- func (m *MethodSpy[Req, Resp]) Always(fn func(context.Context, Req) (Resp, error)) *MethodSpy[Req, Resp]
- func (m *MethodSpy[Req, Resp]) Count() int
- func (m *MethodSpy[Req, Resp]) Last() (Req, bool)
- func (m *MethodSpy[Req, Resp]) OnCall(i int, fn func(context.Context, Req) (Resp, error)) *MethodSpy[Req, Resp]
- func (m *MethodSpy[Req, Resp]) Reset()
- func (m *MethodSpy[Req, Resp]) Returns(resp Resp, err error) *MethodSpy[Req, Resp]
- type Option
- type RequestCapture
- type TestEnv
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exec ¶
Exec builds and executes the root command with the given args, returning captured stdout, stderr, and any error from cmd.Execute().
func FakeJWT ¶ added in v0.34.0
FakeJWT returns an unsigned JWT with claims, shaped like the access tokens of the login server.
func FindContextEntry ¶
func FindContextEntry(t *testing.T, path, name string) *config.ContextEntry
FindContextEntry reads the YAML config file at path and returns a pointer to the ContextEntry whose Name matches name, or nil if not found.
func WriteConfigFile ¶
WriteConfigFile marshals content as JSON and writes it to dir/config.json. Returns the full path for use with --config or QDRANT_CLOUD_CONFIG.
func WriteContextConfigFile ¶
func WriteContextConfigFile(t *testing.T, dir, currentContext string, contexts map[string]map[string]string) string
WriteContextConfigFile writes a context-format YAML config file to dir/config.yaml. Contexts are written as a YAML slice (- name: ...) sorted by name for deterministic output. Each context's values are keyed by their YAML names: endpoint, api_key, api_key_command, account_id, and auth ("oauth" for a context that uses the OAuth login). Returns the full path for use with --config or QDRANT_CLOUD_CONFIG.
Types ¶
type FakeAccountService ¶ added in v0.20.0
type FakeAccountService struct {
accountv1.UnimplementedAccountServiceServer
ListAccountInvitesCalls MethodSpy[*accountv1.ListAccountInvitesRequest, *accountv1.ListAccountInvitesResponse]
GetAccountInviteCalls MethodSpy[*accountv1.GetAccountInviteRequest, *accountv1.GetAccountInviteResponse]
CreateAccountInviteCalls MethodSpy[*accountv1.CreateAccountInviteRequest, *accountv1.CreateAccountInviteResponse]
DeleteAccountInviteCalls MethodSpy[*accountv1.DeleteAccountInviteRequest, *accountv1.DeleteAccountInviteResponse]
ListAccountsCalls MethodSpy[*accountv1.ListAccountsRequest, *accountv1.ListAccountsResponse]
GetAccountCalls MethodSpy[*accountv1.GetAccountRequest, *accountv1.GetAccountResponse]
UpdateAccountCalls MethodSpy[*accountv1.UpdateAccountRequest, *accountv1.UpdateAccountResponse]
ListAccountMembersCalls MethodSpy[*accountv1.ListAccountMembersRequest, *accountv1.ListAccountMembersResponse]
GetAccountMemberCalls MethodSpy[*accountv1.GetAccountMemberRequest, *accountv1.GetAccountMemberResponse]
}
FakeAccountService is a test fake that implements AccountServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeAccountService) CreateAccountInvite ¶ added in v0.20.0
func (f *FakeAccountService) CreateAccountInvite(ctx context.Context, req *accountv1.CreateAccountInviteRequest) (*accountv1.CreateAccountInviteResponse, error)
CreateAccountInvite records the call and dispatches via CreateAccountInviteCalls.
func (*FakeAccountService) DeleteAccountInvite ¶ added in v0.20.0
func (f *FakeAccountService) DeleteAccountInvite(ctx context.Context, req *accountv1.DeleteAccountInviteRequest) (*accountv1.DeleteAccountInviteResponse, error)
DeleteAccountInvite records the call and dispatches via DeleteAccountInviteCalls.
func (*FakeAccountService) GetAccount ¶ added in v0.20.0
func (f *FakeAccountService) GetAccount(ctx context.Context, req *accountv1.GetAccountRequest) (*accountv1.GetAccountResponse, error)
GetAccount records the call and dispatches via GetAccountCalls.
func (*FakeAccountService) GetAccountInvite ¶ added in v0.20.0
func (f *FakeAccountService) GetAccountInvite(ctx context.Context, req *accountv1.GetAccountInviteRequest) (*accountv1.GetAccountInviteResponse, error)
GetAccountInvite records the call and dispatches via GetAccountInviteCalls.
func (*FakeAccountService) GetAccountMember ¶ added in v0.20.0
func (f *FakeAccountService) GetAccountMember(ctx context.Context, req *accountv1.GetAccountMemberRequest) (*accountv1.GetAccountMemberResponse, error)
GetAccountMember records the call and dispatches via GetAccountMemberCalls.
func (*FakeAccountService) ListAccountInvites ¶ added in v0.20.0
func (f *FakeAccountService) ListAccountInvites(ctx context.Context, req *accountv1.ListAccountInvitesRequest) (*accountv1.ListAccountInvitesResponse, error)
ListAccountInvites records the call and dispatches via ListAccountInvitesCalls.
func (*FakeAccountService) ListAccountMembers ¶ added in v0.20.0
func (f *FakeAccountService) ListAccountMembers(ctx context.Context, req *accountv1.ListAccountMembersRequest) (*accountv1.ListAccountMembersResponse, error)
ListAccountMembers records the call and dispatches via ListAccountMembersCalls.
func (*FakeAccountService) ListAccounts ¶ added in v0.20.0
func (f *FakeAccountService) ListAccounts(ctx context.Context, req *accountv1.ListAccountsRequest) (*accountv1.ListAccountsResponse, error)
ListAccounts records the call and dispatches via ListAccountsCalls.
func (*FakeAccountService) UpdateAccount ¶ added in v0.20.0
func (f *FakeAccountService) UpdateAccount(ctx context.Context, req *accountv1.UpdateAccountRequest) (*accountv1.UpdateAccountResponse, error)
UpdateAccount records the call and dispatches via UpdateAccountCalls.
type FakeAuthService ¶ added in v0.19.0
type FakeAuthService struct {
authv1.UnimplementedAuthServiceServer
ListManagementKeysCalls MethodSpy[*authv1.ListManagementKeysRequest, *authv1.ListManagementKeysResponse]
CreateManagementKeyCalls MethodSpy[*authv1.CreateManagementKeyRequest, *authv1.CreateManagementKeyResponse]
DeleteManagementKeyCalls MethodSpy[*authv1.DeleteManagementKeyRequest, *authv1.DeleteManagementKeyResponse]
}
FakeAuthService is a test fake that implements AuthServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeAuthService) CreateManagementKey ¶ added in v0.19.0
func (f *FakeAuthService) CreateManagementKey(ctx context.Context, req *authv1.CreateManagementKeyRequest) (*authv1.CreateManagementKeyResponse, error)
CreateManagementKey records the call and dispatches via CreateManagementKeyCalls.
func (*FakeAuthService) DeleteManagementKey ¶ added in v0.19.0
func (f *FakeAuthService) DeleteManagementKey(ctx context.Context, req *authv1.DeleteManagementKeyRequest) (*authv1.DeleteManagementKeyResponse, error)
DeleteManagementKey records the call and dispatches via DeleteManagementKeyCalls.
func (*FakeAuthService) ListManagementKeys ¶ added in v0.19.0
func (f *FakeAuthService) ListManagementKeys(ctx context.Context, req *authv1.ListManagementKeysRequest) (*authv1.ListManagementKeysResponse, error)
ListManagementKeys records the call and dispatches via ListManagementKeysCalls.
type FakeBackupService ¶ added in v0.2.0
type FakeBackupService struct {
backupv1.UnimplementedBackupServiceServer
ListBackupsCalls MethodSpy[*backupv1.ListBackupsRequest, *backupv1.ListBackupsResponse]
GetBackupCalls MethodSpy[*backupv1.GetBackupRequest, *backupv1.GetBackupResponse]
CreateBackupCalls MethodSpy[*backupv1.CreateBackupRequest, *backupv1.CreateBackupResponse]
DeleteBackupCalls MethodSpy[*backupv1.DeleteBackupRequest, *backupv1.DeleteBackupResponse]
ListBackupRestoresCalls MethodSpy[*backupv1.ListBackupRestoresRequest, *backupv1.ListBackupRestoresResponse]
RestoreBackupCalls MethodSpy[*backupv1.RestoreBackupRequest, *backupv1.RestoreBackupResponse]
ListBackupSchedulesCalls MethodSpy[*backupv1.ListBackupSchedulesRequest, *backupv1.ListBackupSchedulesResponse]
GetBackupScheduleCalls MethodSpy[*backupv1.GetBackupScheduleRequest, *backupv1.GetBackupScheduleResponse]
CreateBackupScheduleCalls MethodSpy[*backupv1.CreateBackupScheduleRequest, *backupv1.CreateBackupScheduleResponse]
UpdateBackupScheduleCalls MethodSpy[*backupv1.UpdateBackupScheduleRequest, *backupv1.UpdateBackupScheduleResponse]
DeleteBackupScheduleCalls MethodSpy[*backupv1.DeleteBackupScheduleRequest, *backupv1.DeleteBackupScheduleResponse]
}
FakeBackupService is a test fake that implements BackupServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeBackupService) CreateBackup ¶ added in v0.2.0
func (f *FakeBackupService) CreateBackup(ctx context.Context, req *backupv1.CreateBackupRequest) (*backupv1.CreateBackupResponse, error)
CreateBackup records the call and dispatches via CreateBackupCalls.
func (*FakeBackupService) CreateBackupSchedule ¶ added in v0.2.0
func (f *FakeBackupService) CreateBackupSchedule(ctx context.Context, req *backupv1.CreateBackupScheduleRequest) (*backupv1.CreateBackupScheduleResponse, error)
CreateBackupSchedule records the call and dispatches via CreateBackupScheduleCalls.
func (*FakeBackupService) DeleteBackup ¶ added in v0.2.0
func (f *FakeBackupService) DeleteBackup(ctx context.Context, req *backupv1.DeleteBackupRequest) (*backupv1.DeleteBackupResponse, error)
DeleteBackup records the call and dispatches via DeleteBackupCalls.
func (*FakeBackupService) DeleteBackupSchedule ¶ added in v0.2.0
func (f *FakeBackupService) DeleteBackupSchedule(ctx context.Context, req *backupv1.DeleteBackupScheduleRequest) (*backupv1.DeleteBackupScheduleResponse, error)
DeleteBackupSchedule records the call and dispatches via DeleteBackupScheduleCalls.
func (*FakeBackupService) GetBackup ¶ added in v0.2.0
func (f *FakeBackupService) GetBackup(ctx context.Context, req *backupv1.GetBackupRequest) (*backupv1.GetBackupResponse, error)
GetBackup records the call and dispatches via GetBackupCalls.
func (*FakeBackupService) GetBackupSchedule ¶ added in v0.2.0
func (f *FakeBackupService) GetBackupSchedule(ctx context.Context, req *backupv1.GetBackupScheduleRequest) (*backupv1.GetBackupScheduleResponse, error)
GetBackupSchedule records the call and dispatches via GetBackupScheduleCalls.
func (*FakeBackupService) ListBackupRestores ¶ added in v0.2.0
func (f *FakeBackupService) ListBackupRestores(ctx context.Context, req *backupv1.ListBackupRestoresRequest) (*backupv1.ListBackupRestoresResponse, error)
ListBackupRestores records the call and dispatches via ListBackupRestoresCalls.
func (*FakeBackupService) ListBackupSchedules ¶ added in v0.2.0
func (f *FakeBackupService) ListBackupSchedules(ctx context.Context, req *backupv1.ListBackupSchedulesRequest) (*backupv1.ListBackupSchedulesResponse, error)
ListBackupSchedules records the call and dispatches via ListBackupSchedulesCalls.
func (*FakeBackupService) ListBackups ¶ added in v0.2.0
func (f *FakeBackupService) ListBackups(ctx context.Context, req *backupv1.ListBackupsRequest) (*backupv1.ListBackupsResponse, error)
ListBackups records the call and dispatches via ListBackupsCalls.
func (*FakeBackupService) RestoreBackup ¶ added in v0.2.0
func (f *FakeBackupService) RestoreBackup(ctx context.Context, req *backupv1.RestoreBackupRequest) (*backupv1.RestoreBackupResponse, error)
RestoreBackup records the call and dispatches via RestoreBackupCalls.
func (*FakeBackupService) UpdateBackupSchedule ¶ added in v0.2.0
func (f *FakeBackupService) UpdateBackupSchedule(ctx context.Context, req *backupv1.UpdateBackupScheduleRequest) (*backupv1.UpdateBackupScheduleResponse, error)
UpdateBackupSchedule records the call and dispatches via UpdateBackupScheduleCalls.
type FakeBookingService ¶
type FakeBookingService struct {
bookingv1.UnimplementedBookingServiceServer
ListPackagesCalls MethodSpy[*bookingv1.ListPackagesRequest, *bookingv1.ListPackagesResponse]
ListGlobalPackagesCalls MethodSpy[*bookingv1.ListGlobalPackagesRequest, *bookingv1.ListGlobalPackagesResponse]
GetPackageCalls MethodSpy[*bookingv1.GetPackageRequest, *bookingv1.GetPackageResponse]
ListGlobalInferenceModelsCalls MethodSpy[*bookingv1.ListGlobalInferenceModelsRequest, *bookingv1.ListGlobalInferenceModelsResponse]
}
FakeBookingService is a test fake that implements BookingServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeBookingService) GetPackage ¶ added in v0.4.1
func (f *FakeBookingService) GetPackage(ctx context.Context, req *bookingv1.GetPackageRequest) (*bookingv1.GetPackageResponse, error)
GetPackage records the call and dispatches via GetPackageCalls.
func (*FakeBookingService) ListGlobalInferenceModels ¶ added in v0.29.0
func (f *FakeBookingService) ListGlobalInferenceModels(ctx context.Context, req *bookingv1.ListGlobalInferenceModelsRequest) (*bookingv1.ListGlobalInferenceModelsResponse, error)
ListGlobalInferenceModels records the call and dispatches via ListGlobalInferenceModelsCalls.
func (*FakeBookingService) ListGlobalPackages ¶ added in v0.29.0
func (f *FakeBookingService) ListGlobalPackages(ctx context.Context, req *bookingv1.ListGlobalPackagesRequest) (*bookingv1.ListGlobalPackagesResponse, error)
ListGlobalPackages records the call and dispatches via ListGlobalPackagesCalls.
func (*FakeBookingService) ListPackages ¶
func (f *FakeBookingService) ListPackages(ctx context.Context, req *bookingv1.ListPackagesRequest) (*bookingv1.ListPackagesResponse, error)
ListPackages records the call and dispatches via ListPackagesCalls.
type FakeClusterService ¶
type FakeClusterService struct {
clusterv1.UnimplementedClusterServiceServer
ListClustersCalls MethodSpy[*clusterv1.ListClustersRequest, *clusterv1.ListClustersResponse]
GetClusterCalls MethodSpy[*clusterv1.GetClusterRequest, *clusterv1.GetClusterResponse]
GetClusterDownscaleRiskCalls MethodSpy[*clusterv1.GetClusterDownscaleRiskRequest, *clusterv1.GetClusterDownscaleRiskResponse]
CreateClusterCalls MethodSpy[*clusterv1.CreateClusterRequest, *clusterv1.CreateClusterResponse]
UpdateClusterCalls MethodSpy[*clusterv1.UpdateClusterRequest, *clusterv1.UpdateClusterResponse]
DeleteClusterCalls MethodSpy[*clusterv1.DeleteClusterRequest, *clusterv1.DeleteClusterResponse]
RestartClusterCalls MethodSpy[*clusterv1.RestartClusterRequest, *clusterv1.RestartClusterResponse]
SuspendClusterCalls MethodSpy[*clusterv1.SuspendClusterRequest, *clusterv1.SuspendClusterResponse]
UnsuspendClusterCalls MethodSpy[*clusterv1.UnsuspendClusterRequest, *clusterv1.UnsuspendClusterResponse]
SuggestClusterNameCalls MethodSpy[*clusterv1.SuggestClusterNameRequest, *clusterv1.SuggestClusterNameResponse]
ListQdrantReleasesCalls MethodSpy[*clusterv1.ListQdrantReleasesRequest, *clusterv1.ListQdrantReleasesResponse]
CreateClusterFromBackupCalls MethodSpy[*clusterv1.CreateClusterFromBackupRequest, *clusterv1.CreateClusterFromBackupResponse]
}
FakeClusterService is a test fake that implements ClusterServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeClusterService) CreateCluster ¶
func (f *FakeClusterService) CreateCluster(ctx context.Context, req *clusterv1.CreateClusterRequest) (*clusterv1.CreateClusterResponse, error)
CreateCluster records the call and dispatches via CreateClusterCalls.
func (*FakeClusterService) CreateClusterFromBackup ¶ added in v0.18.0
func (f *FakeClusterService) CreateClusterFromBackup(ctx context.Context, req *clusterv1.CreateClusterFromBackupRequest) (*clusterv1.CreateClusterFromBackupResponse, error)
CreateClusterFromBackup records the call and dispatches via CreateClusterFromBackupCalls.
func (*FakeClusterService) DeleteCluster ¶
func (f *FakeClusterService) DeleteCluster(ctx context.Context, req *clusterv1.DeleteClusterRequest) (*clusterv1.DeleteClusterResponse, error)
DeleteCluster records the call and dispatches via DeleteClusterCalls.
func (*FakeClusterService) GetCluster ¶
func (f *FakeClusterService) GetCluster(ctx context.Context, req *clusterv1.GetClusterRequest) (*clusterv1.GetClusterResponse, error)
GetCluster records the call and dispatches via GetClusterCalls.
func (*FakeClusterService) GetClusterDownscaleRisk ¶ added in v0.28.0
func (f *FakeClusterService) GetClusterDownscaleRisk(ctx context.Context, req *clusterv1.GetClusterDownscaleRiskRequest) (*clusterv1.GetClusterDownscaleRiskResponse, error)
GetClusterDownscaleRisk records the call and dispatches via GetClusterDownscaleRiskCalls.
func (*FakeClusterService) ListClusters ¶
func (f *FakeClusterService) ListClusters(ctx context.Context, req *clusterv1.ListClustersRequest) (*clusterv1.ListClustersResponse, error)
ListClusters records the call and dispatches via ListClustersCalls.
func (*FakeClusterService) ListQdrantReleases ¶
func (f *FakeClusterService) ListQdrantReleases(ctx context.Context, req *clusterv1.ListQdrantReleasesRequest) (*clusterv1.ListQdrantReleasesResponse, error)
ListQdrantReleases records the call and dispatches via ListQdrantReleasesCalls.
func (*FakeClusterService) RestartCluster ¶
func (f *FakeClusterService) RestartCluster(ctx context.Context, req *clusterv1.RestartClusterRequest) (*clusterv1.RestartClusterResponse, error)
RestartCluster records the call and dispatches via RestartClusterCalls.
func (*FakeClusterService) SuggestClusterName ¶
func (f *FakeClusterService) SuggestClusterName(ctx context.Context, req *clusterv1.SuggestClusterNameRequest) (*clusterv1.SuggestClusterNameResponse, error)
SuggestClusterName records the call and dispatches via SuggestClusterNameCalls.
func (*FakeClusterService) SuspendCluster ¶
func (f *FakeClusterService) SuspendCluster(ctx context.Context, req *clusterv1.SuspendClusterRequest) (*clusterv1.SuspendClusterResponse, error)
SuspendCluster records the call and dispatches via SuspendClusterCalls.
func (*FakeClusterService) UnsuspendCluster ¶
func (f *FakeClusterService) UnsuspendCluster(ctx context.Context, req *clusterv1.UnsuspendClusterRequest) (*clusterv1.UnsuspendClusterResponse, error)
UnsuspendCluster records the call and dispatches via UnsuspendClusterCalls.
func (*FakeClusterService) UpdateCluster ¶
func (f *FakeClusterService) UpdateCluster(ctx context.Context, req *clusterv1.UpdateClusterRequest) (*clusterv1.UpdateClusterResponse, error)
UpdateCluster records the call and dispatches via UpdateClusterCalls.
type FakeDatabaseApiKeyService ¶
type FakeDatabaseApiKeyService struct {
clusterauthv2.UnimplementedDatabaseApiKeyServiceServer
ListDatabaseApiKeysCalls MethodSpy[*clusterauthv2.ListDatabaseApiKeysRequest, *clusterauthv2.ListDatabaseApiKeysResponse]
CreateDatabaseApiKeyCalls MethodSpy[*clusterauthv2.CreateDatabaseApiKeyRequest, *clusterauthv2.CreateDatabaseApiKeyResponse]
DeleteDatabaseApiKeyCalls MethodSpy[*clusterauthv2.DeleteDatabaseApiKeyRequest, *clusterauthv2.DeleteDatabaseApiKeyResponse]
}
FakeDatabaseApiKeyService is a test fake that implements DatabaseApiKeyServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeDatabaseApiKeyService) CreateDatabaseApiKey ¶
func (f *FakeDatabaseApiKeyService) CreateDatabaseApiKey(ctx context.Context, req *clusterauthv2.CreateDatabaseApiKeyRequest) (*clusterauthv2.CreateDatabaseApiKeyResponse, error)
CreateDatabaseApiKey records the call and dispatches via CreateDatabaseApiKeyCalls.
func (*FakeDatabaseApiKeyService) DeleteDatabaseApiKey ¶
func (f *FakeDatabaseApiKeyService) DeleteDatabaseApiKey(ctx context.Context, req *clusterauthv2.DeleteDatabaseApiKeyRequest) (*clusterauthv2.DeleteDatabaseApiKeyResponse, error)
DeleteDatabaseApiKey records the call and dispatches via DeleteDatabaseApiKeyCalls.
func (*FakeDatabaseApiKeyService) ListDatabaseApiKeys ¶
func (f *FakeDatabaseApiKeyService) ListDatabaseApiKeys(ctx context.Context, req *clusterauthv2.ListDatabaseApiKeysRequest) (*clusterauthv2.ListDatabaseApiKeysResponse, error)
ListDatabaseApiKeys records the call and dispatches via ListDatabaseApiKeysCalls.
type FakeHybridService ¶ added in v0.15.0
type FakeHybridService struct {
hybridv1.UnimplementedHybridCloudServiceServer
ListHybridCloudEnvironmentsCalls MethodSpy[*hybridv1.ListHybridCloudEnvironmentsRequest, *hybridv1.ListHybridCloudEnvironmentsResponse]
GetHybridCloudEnvironmentCalls MethodSpy[*hybridv1.GetHybridCloudEnvironmentRequest, *hybridv1.GetHybridCloudEnvironmentResponse]
CreateHybridCloudEnvironmentCalls MethodSpy[*hybridv1.CreateHybridCloudEnvironmentRequest, *hybridv1.CreateHybridCloudEnvironmentResponse]
UpdateHybridCloudEnvironmentCalls MethodSpy[*hybridv1.UpdateHybridCloudEnvironmentRequest, *hybridv1.UpdateHybridCloudEnvironmentResponse]
DeleteHybridCloudEnvironmentCalls MethodSpy[*hybridv1.DeleteHybridCloudEnvironmentRequest, *hybridv1.DeleteHybridCloudEnvironmentResponse]
GenerateBootstrapCommandsCalls MethodSpy[*hybridv1.GenerateBootstrapCommandsRequest, *hybridv1.GenerateBootstrapCommandsResponse]
}
FakeHybridService is a test fake that implements HybridCloudServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeHybridService) CreateHybridCloudEnvironment ¶ added in v0.15.0
func (f *FakeHybridService) CreateHybridCloudEnvironment(ctx context.Context, req *hybridv1.CreateHybridCloudEnvironmentRequest) (*hybridv1.CreateHybridCloudEnvironmentResponse, error)
CreateHybridCloudEnvironment records the call and dispatches via CreateHybridCloudEnvironmentCalls.
func (*FakeHybridService) DeleteHybridCloudEnvironment ¶ added in v0.15.0
func (f *FakeHybridService) DeleteHybridCloudEnvironment(ctx context.Context, req *hybridv1.DeleteHybridCloudEnvironmentRequest) (*hybridv1.DeleteHybridCloudEnvironmentResponse, error)
DeleteHybridCloudEnvironment records the call and dispatches via DeleteHybridCloudEnvironmentCalls.
func (*FakeHybridService) GenerateBootstrapCommands ¶ added in v0.15.0
func (f *FakeHybridService) GenerateBootstrapCommands(ctx context.Context, req *hybridv1.GenerateBootstrapCommandsRequest) (*hybridv1.GenerateBootstrapCommandsResponse, error)
GenerateBootstrapCommands records the call and dispatches via GenerateBootstrapCommandsCalls.
func (*FakeHybridService) GetHybridCloudEnvironment ¶ added in v0.15.0
func (f *FakeHybridService) GetHybridCloudEnvironment(ctx context.Context, req *hybridv1.GetHybridCloudEnvironmentRequest) (*hybridv1.GetHybridCloudEnvironmentResponse, error)
GetHybridCloudEnvironment records the call and dispatches via GetHybridCloudEnvironmentCalls.
func (*FakeHybridService) ListHybridCloudEnvironments ¶ added in v0.15.0
func (f *FakeHybridService) ListHybridCloudEnvironments(ctx context.Context, req *hybridv1.ListHybridCloudEnvironmentsRequest) (*hybridv1.ListHybridCloudEnvironmentsResponse, error)
ListHybridCloudEnvironments records the call and dispatches via ListHybridCloudEnvironmentsCalls.
func (*FakeHybridService) UpdateHybridCloudEnvironment ¶ added in v0.15.0
func (f *FakeHybridService) UpdateHybridCloudEnvironment(ctx context.Context, req *hybridv1.UpdateHybridCloudEnvironmentRequest) (*hybridv1.UpdateHybridCloudEnvironmentResponse, error)
UpdateHybridCloudEnvironment records the call and dispatches via UpdateHybridCloudEnvironmentCalls.
type FakeIAMService ¶ added in v0.20.0
type FakeIAMService struct {
iamv1.UnimplementedIAMServiceServer
GetAuthenticatedUserCalls MethodSpy[*iamv1.GetAuthenticatedUserRequest, *iamv1.GetAuthenticatedUserResponse]
ListUsersCalls MethodSpy[*iamv1.ListUsersRequest, *iamv1.ListUsersResponse]
ListUserRolesCalls MethodSpy[*iamv1.ListUserRolesRequest, *iamv1.ListUserRolesResponse]
AssignUserRolesCalls MethodSpy[*iamv1.AssignUserRolesRequest, *iamv1.AssignUserRolesResponse]
ListRolesCalls MethodSpy[*iamv1.ListRolesRequest, *iamv1.ListRolesResponse]
GetRoleCalls MethodSpy[*iamv1.GetRoleRequest, *iamv1.GetRoleResponse]
CreateRoleCalls MethodSpy[*iamv1.CreateRoleRequest, *iamv1.CreateRoleResponse]
UpdateRoleCalls MethodSpy[*iamv1.UpdateRoleRequest, *iamv1.UpdateRoleResponse]
DeleteRoleCalls MethodSpy[*iamv1.DeleteRoleRequest, *iamv1.DeleteRoleResponse]
ListPermissionsCalls MethodSpy[*iamv1.ListPermissionsRequest, *iamv1.ListPermissionsResponse]
DeleteUserCalls MethodSpy[*iamv1.DeleteUserRequest, *iamv1.DeleteUserResponse]
}
FakeIAMService is a test fake that implements IAMServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeIAMService) AssignUserRoles ¶ added in v0.20.0
func (f *FakeIAMService) AssignUserRoles(ctx context.Context, req *iamv1.AssignUserRolesRequest) (*iamv1.AssignUserRolesResponse, error)
AssignUserRoles records the call and dispatches via AssignUserRolesCalls.
func (*FakeIAMService) CreateRole ¶ added in v0.20.0
func (f *FakeIAMService) CreateRole(ctx context.Context, req *iamv1.CreateRoleRequest) (*iamv1.CreateRoleResponse, error)
CreateRole records the call and dispatches via CreateRoleCalls.
func (*FakeIAMService) DeleteRole ¶ added in v0.20.0
func (f *FakeIAMService) DeleteRole(ctx context.Context, req *iamv1.DeleteRoleRequest) (*iamv1.DeleteRoleResponse, error)
DeleteRole records the call and dispatches via DeleteRoleCalls.
func (*FakeIAMService) DeleteUser ¶ added in v0.25.0
func (f *FakeIAMService) DeleteUser(ctx context.Context, req *iamv1.DeleteUserRequest) (*iamv1.DeleteUserResponse, error)
DeleteUser records the call and dispatches via DeleteUserCalls.
func (*FakeIAMService) GetAuthenticatedUser ¶ added in v0.20.0
func (f *FakeIAMService) GetAuthenticatedUser(ctx context.Context, req *iamv1.GetAuthenticatedUserRequest) (*iamv1.GetAuthenticatedUserResponse, error)
GetAuthenticatedUser records the call and dispatches via GetAuthenticatedUserCalls.
func (*FakeIAMService) GetRole ¶ added in v0.20.0
func (f *FakeIAMService) GetRole(ctx context.Context, req *iamv1.GetRoleRequest) (*iamv1.GetRoleResponse, error)
GetRole records the call and dispatches via GetRoleCalls.
func (*FakeIAMService) ListPermissions ¶ added in v0.20.0
func (f *FakeIAMService) ListPermissions(ctx context.Context, req *iamv1.ListPermissionsRequest) (*iamv1.ListPermissionsResponse, error)
ListPermissions records the call and dispatches via ListPermissionsCalls.
func (*FakeIAMService) ListRoles ¶ added in v0.20.0
func (f *FakeIAMService) ListRoles(ctx context.Context, req *iamv1.ListRolesRequest) (*iamv1.ListRolesResponse, error)
ListRoles records the call and dispatches via ListRolesCalls.
func (*FakeIAMService) ListUserRoles ¶ added in v0.20.0
func (f *FakeIAMService) ListUserRoles(ctx context.Context, req *iamv1.ListUserRolesRequest) (*iamv1.ListUserRolesResponse, error)
ListUserRoles records the call and dispatches via ListUserRolesCalls.
func (*FakeIAMService) ListUsers ¶ added in v0.20.0
func (f *FakeIAMService) ListUsers(ctx context.Context, req *iamv1.ListUsersRequest) (*iamv1.ListUsersResponse, error)
ListUsers records the call and dispatches via ListUsersCalls.
func (*FakeIAMService) UpdateRole ¶ added in v0.20.0
func (f *FakeIAMService) UpdateRole(ctx context.Context, req *iamv1.UpdateRoleRequest) (*iamv1.UpdateRoleResponse, error)
UpdateRole records the call and dispatches via UpdateRoleCalls.
type FakeMonitoringService ¶ added in v0.17.0
type FakeMonitoringService struct {
monitoringv1.UnimplementedMonitoringServiceServer
GetClusterLogsCalls MethodSpy[*monitoringv1.GetClusterLogsRequest, *monitoringv1.GetClusterLogsResponse]
GetClusterUsageMetricsCalls MethodSpy[*monitoringv1.GetClusterUsageMetricsRequest, *monitoringv1.GetClusterUsageMetricsResponse]
GetClusterSummaryMetricsCalls MethodSpy[*monitoringv1.GetClusterSummaryMetricsRequest, *monitoringv1.GetClusterSummaryMetricsResponse]
ListClusterAlertsCalls MethodSpy[*monitoringv1.ListClusterAlertsRequest, *monitoringv1.ListClusterAlertsResponse]
}
FakeMonitoringService is a test fake that implements MonitoringServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeMonitoringService) GetClusterLogs ¶ added in v0.17.0
func (f *FakeMonitoringService) GetClusterLogs(ctx context.Context, req *monitoringv1.GetClusterLogsRequest) (*monitoringv1.GetClusterLogsResponse, error)
GetClusterLogs records the call and dispatches via GetClusterLogsCalls.
func (*FakeMonitoringService) GetClusterSummaryMetrics ¶ added in v0.36.0
func (f *FakeMonitoringService) GetClusterSummaryMetrics(ctx context.Context, req *monitoringv1.GetClusterSummaryMetricsRequest) (*monitoringv1.GetClusterSummaryMetricsResponse, error)
GetClusterSummaryMetrics records the call and dispatches via GetClusterSummaryMetricsCalls.
func (*FakeMonitoringService) GetClusterUsageMetrics ¶ added in v0.36.0
func (f *FakeMonitoringService) GetClusterUsageMetrics(ctx context.Context, req *monitoringv1.GetClusterUsageMetricsRequest) (*monitoringv1.GetClusterUsageMetricsResponse, error)
GetClusterUsageMetrics records the call and dispatches via GetClusterUsageMetricsCalls.
func (*FakeMonitoringService) ListClusterAlerts ¶ added in v0.32.0
func (f *FakeMonitoringService) ListClusterAlerts(ctx context.Context, req *monitoringv1.ListClusterAlertsRequest) (*monitoringv1.ListClusterAlertsResponse, error)
ListClusterAlerts records the call and dispatches via ListClusterAlertsCalls.
type FakeOAuthServer ¶ added in v0.34.0
type FakeOAuthServer struct {
// Cluster names the environment: the API is api.<Cluster>.qdrant.io, the login server
// login.<Cluster>.qdrant.io. The default is development-cloud.
Cluster string
// AccessToken and RefreshToken are what a login issues.
AccessToken string
RefreshToken string
// RefreshedAccessToken is what a refresh issues.
RefreshedAccessToken string
// ExpiresIn is the expires_in of token responses; 0 leaves it out.
ExpiresIn int
// RefreshError, when set, is the error code a refresh gets.
RefreshError string
// contains filtered or unexported fields
}
FakeOAuthServer is the OAuth setup of one Qdrant Cloud environment: the API's protected-resource metadata and the login server (OpenID configuration, token, device authorization and revocation endpoints). With WithOAuthServer, every OAuth request of the CLI goes to it, whatever its host. The browser login gets the code "test-code" without a browser.
func NewFakeOAuthServer ¶ added in v0.34.0
func NewFakeOAuthServer() *FakeOAuthServer
NewFakeOAuthServer returns a FakeOAuthServer for the development environment that issues "access-from-login" and "refresh-from-login", valid for an hour.
func (*FakeOAuthServer) DeviceForms ¶ added in v0.34.0
func (f *FakeOAuthServer) DeviceForms() []url.Values
DeviceForms returns the forms posted to the device authorization endpoint, in order.
func (*FakeOAuthServer) Revoked ¶ added in v0.34.0
func (f *FakeOAuthServer) Revoked() []string
Revoked returns the refresh tokens that were revoked, in order.
func (*FakeOAuthServer) TokenForms ¶ added in v0.34.0
func (f *FakeOAuthServer) TokenForms() []url.Values
TokenForms returns the forms posted to the token endpoint, in order.
type FakePlatformService ¶
type FakePlatformService struct {
platformv1.UnimplementedPlatformServiceServer
ListCloudProvidersCalls MethodSpy[*platformv1.ListCloudProvidersRequest, *platformv1.ListCloudProvidersResponse]
ListCloudProviderRegionsCalls MethodSpy[*platformv1.ListCloudProviderRegionsRequest, *platformv1.ListCloudProviderRegionsResponse]
}
FakePlatformService is a test fake that implements PlatformServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakePlatformService) ListCloudProviderRegions ¶
func (f *FakePlatformService) ListCloudProviderRegions(ctx context.Context, req *platformv1.ListCloudProviderRegionsRequest) (*platformv1.ListCloudProviderRegionsResponse, error)
ListCloudProviderRegions records the call and dispatches via ListCloudProviderRegionsCalls.
func (*FakePlatformService) ListCloudProviders ¶
func (f *FakePlatformService) ListCloudProviders(ctx context.Context, req *platformv1.ListCloudProvidersRequest) (*platformv1.ListCloudProvidersResponse, error)
ListCloudProviders records the call and dispatches via ListCloudProvidersCalls.
type FakeServerlessBackupService ¶ added in v0.30.0
type FakeServerlessBackupService struct {
spacebackupv1.UnimplementedBackupServiceServer
ListBackupsCalls MethodSpy[*spacebackupv1.ListBackupsRequest, *spacebackupv1.ListBackupsResponse]
GetBackupCalls MethodSpy[*spacebackupv1.GetBackupRequest, *spacebackupv1.GetBackupResponse]
CreateBackupCalls MethodSpy[*spacebackupv1.CreateBackupRequest, *spacebackupv1.CreateBackupResponse]
DeleteBackupCalls MethodSpy[*spacebackupv1.DeleteBackupRequest, *spacebackupv1.DeleteBackupResponse]
ListBackupRestoresCalls MethodSpy[*spacebackupv1.ListBackupRestoresRequest, *spacebackupv1.ListBackupRestoresResponse]
RestoreBackupCalls MethodSpy[*spacebackupv1.RestoreBackupRequest, *spacebackupv1.RestoreBackupResponse]
ListBackupSchedulesCalls MethodSpy[*spacebackupv1.ListBackupSchedulesRequest, *spacebackupv1.ListBackupSchedulesResponse]
GetBackupScheduleCalls MethodSpy[*spacebackupv1.GetBackupScheduleRequest, *spacebackupv1.GetBackupScheduleResponse]
CreateBackupScheduleCalls MethodSpy[*spacebackupv1.CreateBackupScheduleRequest, *spacebackupv1.CreateBackupScheduleResponse]
UpdateBackupScheduleCalls MethodSpy[*spacebackupv1.UpdateBackupScheduleRequest, *spacebackupv1.UpdateBackupScheduleResponse]
DeleteBackupScheduleCalls MethodSpy[*spacebackupv1.DeleteBackupScheduleRequest, *spacebackupv1.DeleteBackupScheduleResponse]
}
FakeServerlessBackupService is a test fake that implements the serverless BackupServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeServerlessBackupService) CreateBackup ¶ added in v0.30.0
func (f *FakeServerlessBackupService) CreateBackup(ctx context.Context, req *spacebackupv1.CreateBackupRequest) (*spacebackupv1.CreateBackupResponse, error)
CreateBackup records the call and dispatches via CreateBackupCalls.
func (*FakeServerlessBackupService) CreateBackupSchedule ¶ added in v0.30.0
func (f *FakeServerlessBackupService) CreateBackupSchedule(ctx context.Context, req *spacebackupv1.CreateBackupScheduleRequest) (*spacebackupv1.CreateBackupScheduleResponse, error)
CreateBackupSchedule records the call and dispatches via CreateBackupScheduleCalls.
func (*FakeServerlessBackupService) DeleteBackup ¶ added in v0.30.0
func (f *FakeServerlessBackupService) DeleteBackup(ctx context.Context, req *spacebackupv1.DeleteBackupRequest) (*spacebackupv1.DeleteBackupResponse, error)
DeleteBackup records the call and dispatches via DeleteBackupCalls.
func (*FakeServerlessBackupService) DeleteBackupSchedule ¶ added in v0.30.0
func (f *FakeServerlessBackupService) DeleteBackupSchedule(ctx context.Context, req *spacebackupv1.DeleteBackupScheduleRequest) (*spacebackupv1.DeleteBackupScheduleResponse, error)
DeleteBackupSchedule records the call and dispatches via DeleteBackupScheduleCalls.
func (*FakeServerlessBackupService) GetBackup ¶ added in v0.30.0
func (f *FakeServerlessBackupService) GetBackup(ctx context.Context, req *spacebackupv1.GetBackupRequest) (*spacebackupv1.GetBackupResponse, error)
GetBackup records the call and dispatches via GetBackupCalls.
func (*FakeServerlessBackupService) GetBackupSchedule ¶ added in v0.30.0
func (f *FakeServerlessBackupService) GetBackupSchedule(ctx context.Context, req *spacebackupv1.GetBackupScheduleRequest) (*spacebackupv1.GetBackupScheduleResponse, error)
GetBackupSchedule records the call and dispatches via GetBackupScheduleCalls.
func (*FakeServerlessBackupService) ListBackupRestores ¶ added in v0.30.0
func (f *FakeServerlessBackupService) ListBackupRestores(ctx context.Context, req *spacebackupv1.ListBackupRestoresRequest) (*spacebackupv1.ListBackupRestoresResponse, error)
ListBackupRestores records the call and dispatches via ListBackupRestoresCalls.
func (*FakeServerlessBackupService) ListBackupSchedules ¶ added in v0.30.0
func (f *FakeServerlessBackupService) ListBackupSchedules(ctx context.Context, req *spacebackupv1.ListBackupSchedulesRequest) (*spacebackupv1.ListBackupSchedulesResponse, error)
ListBackupSchedules records the call and dispatches via ListBackupSchedulesCalls.
func (*FakeServerlessBackupService) ListBackups ¶ added in v0.30.0
func (f *FakeServerlessBackupService) ListBackups(ctx context.Context, req *spacebackupv1.ListBackupsRequest) (*spacebackupv1.ListBackupsResponse, error)
ListBackups records the call and dispatches via ListBackupsCalls.
func (*FakeServerlessBackupService) RestoreBackup ¶ added in v0.30.0
func (f *FakeServerlessBackupService) RestoreBackup(ctx context.Context, req *spacebackupv1.RestoreBackupRequest) (*spacebackupv1.RestoreBackupResponse, error)
RestoreBackup records the call and dispatches via RestoreBackupCalls.
func (*FakeServerlessBackupService) UpdateBackupSchedule ¶ added in v0.30.0
func (f *FakeServerlessBackupService) UpdateBackupSchedule(ctx context.Context, req *spacebackupv1.UpdateBackupScheduleRequest) (*spacebackupv1.UpdateBackupScheduleResponse, error)
UpdateBackupSchedule records the call and dispatches via UpdateBackupScheduleCalls.
type FakeServerlessMonitoringService ¶ added in v0.31.0
type FakeServerlessMonitoringService struct {
serverlessmonitoringv1.UnimplementedMonitoringServiceServer
GetSpaceSummaryMetricsCalls MethodSpy[*serverlessmonitoringv1.GetSpaceSummaryMetricsRequest, *serverlessmonitoringv1.GetSpaceSummaryMetricsResponse]
GetSpaceUsageMetricsCalls MethodSpy[*serverlessmonitoringv1.GetSpaceUsageMetricsRequest, *serverlessmonitoringv1.GetSpaceUsageMetricsResponse]
GetSpaceInferenceMetricsCalls MethodSpy[*serverlessmonitoringv1.GetSpaceInferenceMetricsRequest, *serverlessmonitoringv1.GetSpaceInferenceMetricsResponse]
ListSpaceAlertsCalls MethodSpy[*serverlessmonitoringv1.ListSpaceAlertsRequest, *serverlessmonitoringv1.ListSpaceAlertsResponse]
}
FakeServerlessMonitoringService is a test fake that implements the serverless MonitoringServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeServerlessMonitoringService) GetSpaceInferenceMetrics ¶ added in v0.31.0
func (f *FakeServerlessMonitoringService) GetSpaceInferenceMetrics(ctx context.Context, req *serverlessmonitoringv1.GetSpaceInferenceMetricsRequest) (*serverlessmonitoringv1.GetSpaceInferenceMetricsResponse, error)
GetSpaceInferenceMetrics records the call and dispatches via GetSpaceInferenceMetricsCalls.
func (*FakeServerlessMonitoringService) GetSpaceSummaryMetrics ¶ added in v0.31.0
func (f *FakeServerlessMonitoringService) GetSpaceSummaryMetrics(ctx context.Context, req *serverlessmonitoringv1.GetSpaceSummaryMetricsRequest) (*serverlessmonitoringv1.GetSpaceSummaryMetricsResponse, error)
GetSpaceSummaryMetrics records the call and dispatches via GetSpaceSummaryMetricsCalls.
func (*FakeServerlessMonitoringService) GetSpaceUsageMetrics ¶ added in v0.31.0
func (f *FakeServerlessMonitoringService) GetSpaceUsageMetrics(ctx context.Context, req *serverlessmonitoringv1.GetSpaceUsageMetricsRequest) (*serverlessmonitoringv1.GetSpaceUsageMetricsResponse, error)
GetSpaceUsageMetrics records the call and dispatches via GetSpaceUsageMetricsCalls.
func (*FakeServerlessMonitoringService) ListSpaceAlerts ¶ added in v0.31.0
func (f *FakeServerlessMonitoringService) ListSpaceAlerts(ctx context.Context, req *serverlessmonitoringv1.ListSpaceAlertsRequest) (*serverlessmonitoringv1.ListSpaceAlertsResponse, error)
ListSpaceAlerts records the call and dispatches via ListSpaceAlertsCalls.
type FakeServerlessPlatformService ¶ added in v0.31.0
type FakeServerlessPlatformService struct {
serverlessplatformv1.UnimplementedPlatformServiceServer
ListCloudRegionsCalls MethodSpy[*serverlessplatformv1.ListCloudRegionsRequest, *serverlessplatformv1.ListCloudRegionsResponse]
GetCloudRegionCalls MethodSpy[*serverlessplatformv1.GetCloudRegionRequest, *serverlessplatformv1.GetCloudRegionResponse]
}
FakeServerlessPlatformService is a test fake that implements the serverless PlatformServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeServerlessPlatformService) GetCloudRegion ¶ added in v0.31.0
func (f *FakeServerlessPlatformService) GetCloudRegion(ctx context.Context, req *serverlessplatformv1.GetCloudRegionRequest) (*serverlessplatformv1.GetCloudRegionResponse, error)
GetCloudRegion records the call and dispatches via GetCloudRegionCalls.
func (*FakeServerlessPlatformService) ListCloudRegions ¶ added in v0.31.0
func (f *FakeServerlessPlatformService) ListCloudRegions(ctx context.Context, req *serverlessplatformv1.ListCloudRegionsRequest) (*serverlessplatformv1.ListCloudRegionsResponse, error)
ListCloudRegions records the call and dispatches via ListCloudRegionsCalls.
type FakeServerlessQuotaService ¶ added in v0.31.0
type FakeServerlessQuotaService struct {
serverlessquotav1.UnimplementedQuotaServiceServer
GetQuotasCalls MethodSpy[*serverlessquotav1.GetQuotasRequest, *serverlessquotav1.GetQuotasResponse]
}
FakeServerlessQuotaService is a test fake that implements the serverless QuotaServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeServerlessQuotaService) GetQuotas ¶ added in v0.31.0
func (f *FakeServerlessQuotaService) GetQuotas(ctx context.Context, req *serverlessquotav1.GetQuotasRequest) (*serverlessquotav1.GetQuotasResponse, error)
GetQuotas records the call and dispatches via GetQuotasCalls.
type FakeServerlessSpaceApiKeyService ¶ added in v0.30.0
type FakeServerlessSpaceApiKeyService struct {
spaceauthv1.UnimplementedSpaceApiKeyServiceServer
ListSpaceApiKeysCalls MethodSpy[*spaceauthv1.ListSpaceApiKeysRequest, *spaceauthv1.ListSpaceApiKeysResponse]
CreateSpaceApiKeyCalls MethodSpy[*spaceauthv1.CreateSpaceApiKeyRequest, *spaceauthv1.CreateSpaceApiKeyResponse]
DeleteSpaceApiKeyCalls MethodSpy[*spaceauthv1.DeleteSpaceApiKeyRequest, *spaceauthv1.DeleteSpaceApiKeyResponse]
}
FakeServerlessSpaceApiKeyService is a test fake that implements the serverless SpaceApiKeyServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeServerlessSpaceApiKeyService) CreateSpaceApiKey ¶ added in v0.30.0
func (f *FakeServerlessSpaceApiKeyService) CreateSpaceApiKey(ctx context.Context, req *spaceauthv1.CreateSpaceApiKeyRequest) (*spaceauthv1.CreateSpaceApiKeyResponse, error)
CreateSpaceApiKey records the call and dispatches via CreateSpaceApiKeyCalls.
func (*FakeServerlessSpaceApiKeyService) DeleteSpaceApiKey ¶ added in v0.30.0
func (f *FakeServerlessSpaceApiKeyService) DeleteSpaceApiKey(ctx context.Context, req *spaceauthv1.DeleteSpaceApiKeyRequest) (*spaceauthv1.DeleteSpaceApiKeyResponse, error)
DeleteSpaceApiKey records the call and dispatches via DeleteSpaceApiKeyCalls.
func (*FakeServerlessSpaceApiKeyService) ListSpaceApiKeys ¶ added in v0.30.0
func (f *FakeServerlessSpaceApiKeyService) ListSpaceApiKeys(ctx context.Context, req *spaceauthv1.ListSpaceApiKeysRequest) (*spaceauthv1.ListSpaceApiKeysResponse, error)
ListSpaceApiKeys records the call and dispatches via ListSpaceApiKeysCalls.
type FakeServerlessSpaceService ¶ added in v0.30.0
type FakeServerlessSpaceService struct {
spacev1.UnimplementedSpaceServiceServer
ListSpacesCalls MethodSpy[*spacev1.ListSpacesRequest, *spacev1.ListSpacesResponse]
GetSpaceCalls MethodSpy[*spacev1.GetSpaceRequest, *spacev1.GetSpaceResponse]
CreateSpaceCalls MethodSpy[*spacev1.CreateSpaceRequest, *spacev1.CreateSpaceResponse]
CreateSpaceFromBackupCalls MethodSpy[*spacev1.CreateSpaceFromBackupRequest, *spacev1.CreateSpaceFromBackupResponse]
UpdateSpaceCalls MethodSpy[*spacev1.UpdateSpaceRequest, *spacev1.UpdateSpaceResponse]
DeleteSpaceCalls MethodSpy[*spacev1.DeleteSpaceRequest, *spacev1.DeleteSpaceResponse]
SuggestSpaceNameCalls MethodSpy[*spacev1.SuggestSpaceNameRequest, *spacev1.SuggestSpaceNameResponse]
}
FakeServerlessSpaceService is a test fake that implements the serverless SpaceServiceServer. Use the *Calls fields to configure responses and inspect captured requests.
func (*FakeServerlessSpaceService) CreateSpace ¶ added in v0.30.0
func (f *FakeServerlessSpaceService) CreateSpace(ctx context.Context, req *spacev1.CreateSpaceRequest) (*spacev1.CreateSpaceResponse, error)
CreateSpace records the call and dispatches via CreateSpaceCalls.
func (*FakeServerlessSpaceService) CreateSpaceFromBackup ¶ added in v0.30.0
func (f *FakeServerlessSpaceService) CreateSpaceFromBackup(ctx context.Context, req *spacev1.CreateSpaceFromBackupRequest) (*spacev1.CreateSpaceFromBackupResponse, error)
CreateSpaceFromBackup records the call and dispatches via CreateSpaceFromBackupCalls.
func (*FakeServerlessSpaceService) DeleteSpace ¶ added in v0.30.0
func (f *FakeServerlessSpaceService) DeleteSpace(ctx context.Context, req *spacev1.DeleteSpaceRequest) (*spacev1.DeleteSpaceResponse, error)
DeleteSpace records the call and dispatches via DeleteSpaceCalls.
func (*FakeServerlessSpaceService) GetSpace ¶ added in v0.30.0
func (f *FakeServerlessSpaceService) GetSpace(ctx context.Context, req *spacev1.GetSpaceRequest) (*spacev1.GetSpaceResponse, error)
GetSpace records the call and dispatches via GetSpaceCalls.
func (*FakeServerlessSpaceService) ListSpaces ¶ added in v0.30.0
func (f *FakeServerlessSpaceService) ListSpaces(ctx context.Context, req *spacev1.ListSpacesRequest) (*spacev1.ListSpacesResponse, error)
ListSpaces records the call and dispatches via ListSpacesCalls.
func (*FakeServerlessSpaceService) SuggestSpaceName ¶ added in v0.30.0
func (f *FakeServerlessSpaceService) SuggestSpaceName(ctx context.Context, req *spacev1.SuggestSpaceNameRequest) (*spacev1.SuggestSpaceNameResponse, error)
SuggestSpaceName records the call and dispatches via SuggestSpaceNameCalls.
func (*FakeServerlessSpaceService) UpdateSpace ¶ added in v0.30.0
func (f *FakeServerlessSpaceService) UpdateSpace(ctx context.Context, req *spacev1.UpdateSpaceRequest) (*spacev1.UpdateSpaceResponse, error)
UpdateSpace records the call and dispatches via UpdateSpaceCalls.
type MethodSpy ¶ added in v0.3.0
type MethodSpy[Req, Resp any] struct { // contains filtered or unexported fields }
MethodSpy records calls to a single RPC method and optionally dispatches to per-call or fallback handlers. Use the *Calls fields on fake services instead of managing call counters and captured requests manually.
Priority when handling a call: *Func field > OnCall handler > Always handler > Unimplemented default.
func (*MethodSpy[Req, Resp]) All ¶ added in v0.3.0
func (m *MethodSpy[Req, Resp]) All() []Req
All returns a copy of all captured requests in call order.
func (*MethodSpy[Req, Resp]) Always ¶ added in v0.3.0
func (m *MethodSpy[Req, Resp]) Always(fn func(context.Context, Req) (Resp, error)) *MethodSpy[Req, Resp]
Always sets a fallback handler invoked for every call that has no matching OnCall entry. If neither OnCall nor Always is set the method falls back to the gRPC Unimplemented default.
func (*MethodSpy[Req, Resp]) Count ¶ added in v0.3.0
Count returns how many times the method has been called.
func (*MethodSpy[Req, Resp]) Last ¶ added in v0.3.0
Last returns the most recent request and true, or the zero value and false if never called.
func (*MethodSpy[Req, Resp]) OnCall ¶ added in v0.3.0
func (m *MethodSpy[Req, Resp]) OnCall(i int, fn func(context.Context, Req) (Resp, error)) *MethodSpy[Req, Resp]
OnCall registers a handler for the i-th call (0-indexed). Chainable.
type Option ¶
type Option func(*envConfig)
Option configures a TestEnv.
func WithAPIKey ¶
WithAPIKey sets the API key used by the test client's auth interceptor.
func WithAccountID ¶
WithAccountID sets the default account ID pre-configured on the test state.
func WithOAuthServer ¶ added in v0.34.0
func WithOAuthServer(f *FakeOAuthServer) Option
WithOAuthServer sends the OAuth requests of the login to f instead of failing them.
func WithSecretStore ¶ added in v0.34.0
func WithSecretStore(secrets oauth.SecretStore) Option
WithSecretStore keeps the OAuth tokens in secrets instead of a new in-memory keychain. Use it to test a keychain that fails.
func WithVersion ¶
WithVersion sets the CLI version used in the user-agent header.
type RequestCapture ¶
type RequestCapture struct {
// contains filtered or unexported fields
}
RequestCapture is a server-side unary interceptor that records incoming metadata.
func (*RequestCapture) Last ¶
func (rc *RequestCapture) Last() metadata.MD
Last returns the metadata from the most recent request.
type TestEnv ¶
type TestEnv struct {
State *state.State
Server *FakeClusterService
BookingServer *FakeBookingService
PlatformServer *FakePlatformService
DatabaseApiKeyServer *FakeDatabaseApiKeyService
BackupServer *FakeBackupService
HybridServer *FakeHybridService
MonitoringServer *FakeMonitoringService
AuthServer *FakeAuthService
IAMServer *FakeIAMService
AccountServer *FakeAccountService
ServerlessSpaceServer *FakeServerlessSpaceService
ServerlessSpaceApiKeyServer *FakeServerlessSpaceApiKeyService
ServerlessBackupServer *FakeServerlessBackupService
ServerlessPlatformServer *FakeServerlessPlatformService
ServerlessQuotaServer *FakeServerlessQuotaService
ServerlessMonitoringServer *FakeServerlessMonitoringService
Capture *RequestCapture
Cleanup func()
}
TestEnv bundles everything a test needs.
func NewBareTestEnv ¶
NewBareTestEnv creates a test environment with a bufconn-backed gRPC server but with no config values pre-populated in viper. Use this when the test itself controls how config is loaded — for example, to verify that account_id is read from a config file, an environment variable, or a CLI flag. WithAPIKey and WithAccountID have no effect here.
func NewTestEnv ¶
NewTestEnv creates a test environment with a bufconn-backed gRPC server and a pre-populated config. account_id and api_key are set via the highest viper priority (Set), so they reliably override any machine environment variables. Use this for testing command behaviour where a valid account ID is needed but its specific source doesn't matter. Defaults: account_id="test-account-id". Override with WithAccountID / WithAPIKey.
Source Files
¶
- config.go
- exec.go
- fake_account.go
- fake_auth.go
- fake_backup.go
- fake_booking.go
- fake_cluster.go
- fake_database_api_key.go
- fake_hybrid.go
- fake_iam.go
- fake_monitoring.go
- fake_oauth.go
- fake_platform.go
- fake_serverless_backup.go
- fake_serverless_monitoring.go
- fake_serverless_platform.go
- fake_serverless_quota.go
- fake_serverless_space.go
- fake_serverless_space_api_key.go
- method_spy.go
- server.go