teststack

package
v0.0.0-...-d288a6d Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultRealm              = "senda"
	DefaultJWTSecret          = "e2e-test-jwt-secret-at-least-32-characters-long"
	DefaultMasterKey          = "e2e-master-key-must-be-at-least-32-characters"
	DefaultAWSRegion          = "us-east-1"
	DefaultAWSAccessKeyID     = "test-key"
	DefaultAWSSecretAccessKey = "test-secret"
)

Variables

This section is empty.

Functions

func Down

func Down(ctx context.Context, outPath string) error

Types

type Mode

type Mode string
const (
	ModePR      Mode = "pr"
	ModeNightly Mode = "nightly"
)

type Options

type Options struct {
	ProjectRoot   string
	Mode          Mode
	OutPath       string
	Scope         Scope
	ScopeSpec     string
	ScopeWorktree string
	ScopeRun      string
}

type Report

type Report struct {
	Mode     string        `json:"mode"`
	Services Services      `json:"services"`
	Runtime  RuntimeReport `json:"runtime"`
}

func LoadReport

func LoadReport(path string) (*Report, error)

func Up

func Up(ctx context.Context, opts Options) (*Report, error)

type RuntimeReport

type RuntimeReport struct {
	Network                     string            `json:"network"`
	Containers                  map[string]string `json:"containers"`
	KeycloakRealm               string            `json:"keycloak_realm"`
	JWTSecret                   string            `json:"jwt_secret"`
	SkipSNSignatureVerification bool              `json:"skip_sns_signature_verification"`
	ArtifactDir                 string            `json:"artifact_dir,omitempty"`
	Scope                       ScopeReport       `json:"scope"`
}

type Scope

type Scope struct {
	Spec     string
	Worktree string
	Mode     Mode
	Run      string
}

func ResolveScope

func ResolveScope(input ScopeInput) Scope

func ScopeFromReport

func ScopeFromReport(report ScopeReport) Scope

func (Scope) ArtifactRoot

func (s Scope) ArtifactRoot(repoRoot string) string

func (Scope) Canonical

func (s Scope) Canonical() string

func (Scope) DockerName

func (s Scope) DockerName(kind string) string

func (Scope) EnvReportPath

func (s Scope) EnvReportPath(repoRoot string) string

func (Scope) Hash

func (s Scope) Hash() string

func (Scope) Report

func (s Scope) Report(_ string) ScopeReport

func (Scope) RuntimeReport

func (s Scope) RuntimeReport() ScopeReport

type ScopeInput

type ScopeInput struct {
	ProjectRoot string
	Spec        string
	Worktree    string
	Mode        Mode
	Run         string
}

type ScopeReport

type ScopeReport struct {
	Spec      string `json:"spec"`
	Worktree  string `json:"worktree"`
	Mode      string `json:"mode"`
	Run       string `json:"run"`
	Hash      string `json:"hash"`
	Canonical string `json:"canonical,omitempty"`
}

type Services

type Services struct {
	Senda    string `json:"senda,omitempty"`
	Mailpit  string `json:"mailpit,omitempty"`
	Keycloak string `json:"keycloak,omitempty"`
	AWSSim   string `json:"aws_sim,omitempty"`
	Postgres string `json:"postgres,omitempty"`
	Frontend string `json:"frontend,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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