testutils

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAdminClient

func CreateAdminClient(t *testing.T, cfg *Config) *thehive.APIClient

func CreateAuthContext

func CreateAuthContext(t *testing.T, cfg *Config) context.Context

func CreateOrgClient

func CreateOrgClient(t *testing.T, cfg *Config) *thehive.APIClient

func EnsureTestOrganization

func EnsureTestOrganization(t *testing.T, client *thehive.APIClient, ctx context.Context, orgName string) string

func GetOrganizationByName

func GetOrganizationByName(t *testing.T, organizations []thehive.OutputOrganisation, name string) *thehive.OutputOrganisation

func ListOrganizations

func ListOrganizations(t *testing.T, client *thehive.APIClient, ctx context.Context) []thehive.OutputOrganisation

func SetupUserPermissions

func SetupUserPermissions(t *testing.T, client *thehive.APIClient, ctx context.Context, orgName string)

func WaitForTheHive

func WaitForTheHive(t *testing.T, client *thehive.APIClient)

Types

type Config

type Config struct {
	URL      string
	Username string
	Password string
	OrgName  string
}

Config holds configuration for integration tests

func GetTestConfig

func GetTestConfig(t *testing.T) *Config

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL