testcmd

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Command = cli.Command{
	Name:    "tests",
	Aliases: []string{"test"},
	Subcommands: []*cli.Command{
		&runCommand,
		&createCommand,
	},
}

Functions

This section is empty.

Types

type AccessTest

type AccessTest struct {
	User           string   `yaml:"user"`
	Target         string   `yaml:"target"`
	Role           string   `yaml:"role"`
	ExpectedResult []string `yaml:"expected-result"`
}

func (*AccessTest) UnmarshalYAML added in v1.16.1

func (a *AccessTest) UnmarshalYAML(unmarshal func(interface{}) error) error

type GroupTest

type GroupTest struct {
	User     string `yaml:"user"`
	Group    string `yaml:"group"`
	IsMember bool   `yaml:"is-member"`
}

type TestRunner

type TestRunner struct {
	AccessClient    accessv1alpha1connect.AccessServiceClient
	DirectoryClient directoryv1alpha1connect.DirectoryServiceClient
	Users           []*directoryv1alpha1.User
}

func (*TestRunner) RunAccessTest

func (r *TestRunner) RunAccessTest(ctx context.Context, test AccessTest) (string, error)

func (*TestRunner) RunGroupMembershipTest

func (r *TestRunner) RunGroupMembershipTest(ctx context.Context, test GroupTest) error

Jump to

Keyboard shortcuts

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