topgun

package
v6.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

README

TOPGUN

This suite is one level above Testflight in the sense that it will target a BOSH deployment and make changes to the cluster. This is to test things like workers disappearing, being recreated, etc.

Test Boundaries

Do

  • Configure pipelines, run tasks, etc. - same as Testflight.
  • Make changes to the BOSH deployment.
  • Target the Garden/Baggageclaim APIs to verify container/volume presence.
  • Mutate a VM (network partition, data corruption). These can happen in the real world. Just make sure these get cleaned up after.
  • Pretend you're an operator - prefer fly over API use.

Don't

  • Modify the database directly. It's unrealistic to expect arbitrary SQL queries to have run against the database. Try to force scenarios using the above-defined surface area.
  • Only use DB queries to verify state as a last resort, and replace these with fly commands once we bubble up enough information.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildBinary

func BuildBinary() string

func FetchToken

func FetchToken(webURL, username, password string) (*oauth2.Token, error)

func RequestCredsInfo

func RequestCredsInfo(webUrl, token string) ([]byte, error)

func Run

func Run(env []string, command string, argv ...string) *gexec.Session

func SpawnInteractive

func SpawnInteractive(stdin io.Reader, env []string, command string, argv ...string) *gexec.Session

func Start

func Start(env []string, command string, argv ...string) *gexec.Session

func TimestampedBy

func TimestampedBy(msg string)

func Wait

func Wait(session *gexec.Session)

Types

type Container

type Container struct {
	Type  string `json:"type"`
	State string `json:"state"`
	Id    string `json:"id"`
}

type FlyCli

type FlyCli struct {
	Bin    string
	Target string
	Home   string
}

func (*FlyCli) GetContainers

func (f *FlyCli) GetContainers() []Container

func (*FlyCli) GetPipelines

func (f *FlyCli) GetPipelines() []Pipeline

func (*FlyCli) GetUserRole

func (f *FlyCli) GetUserRole(teamName string) []string

func (*FlyCli) GetVersions

func (f *FlyCli) GetVersions(pipeline string, resource string) []Version

func (*FlyCli) GetWorkers

func (f *FlyCli) GetWorkers() []Worker

func (*FlyCli) Login

func (f *FlyCli) Login(user, password, endpoint string, loginArgs ...string)

func (*FlyCli) Run

func (f *FlyCli) Run(argv ...string)

func (*FlyCli) SpawnInteractive

func (f *FlyCli) SpawnInteractive(stdin io.Reader, argv ...string) *gexec.Session

func (*FlyCli) Start

func (f *FlyCli) Start(argv ...string) *gexec.Session

func (*FlyCli) StartWithEnv

func (f *FlyCli) StartWithEnv(env []string, argv ...string) *gexec.Session

type Pipeline

type Pipeline struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	Paused   bool   `json:"paused"`
	Public   bool   `json:"public"`
	TeamName string `json:"team_name"`
}

type Version

type Version struct {
	ID      int               `json:"id"`
	Version map[string]string `json:"version"`
	Enabled bool              `json:"enabled"`
}

type Worker

type Worker struct {
	Name            string `json:"name"`
	State           string `json:"state"`
	GardenAddress   string `json:"addr"`
	BaggageclaimUrl string `json:"baggageclaim_url"`
	Team            string `json:"team"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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