fixture

package
v0.0.0-...-ebb3a86 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2025 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const ControlPlaneAddr = "localhost:9012"

Variables

View Source
var (
	EnvoyAdminAddr = "127.0.0.1:5555"
	DNSUpstream    = netip.MustParseAddrPort("127.0.0.1:53")
)

Functions

func Chunk

func Chunk(mod ...func(c *chunk.Chunk)) chunk.Chunk

func Flavor

func Flavor(mod ...func(f *chunk.Flavor)) chunk.Flavor

func FlavorVersion

func FlavorVersion(t *testing.T, mod ...func(v *chunk.FlavorVersion)) chunk.FlavorVersion

func Instance

func Instance(mod ...func(i *instance.Instance)) instance.Instance

func Node

func Node() struct {
	ID   string
	Addr string
}

func PlatformdClientConn

func PlatformdClientConn(t *testing.T) *grpc.ClientConn

func RunControlPlane

func RunControlPlane(t *testing.T, pg *Postgres)

func RunProxyAPIFixtures

func RunProxyAPIFixtures(ctx context.Context, t *testing.T)

func RunWorkloadAPIFixtures

func RunWorkloadAPIFixtures(t *testing.T)

func Workload

func Workload() workloadv1alpha2.Workload

Types

type FakeCRI

type FakeCRI struct {
	runtimev1.UnimplementedRuntimeServiceServer
	runtimev1.UnimplementedImageServiceServer
	// contains filtered or unexported fields
}

func (*FakeCRI) ListImages

func (*FakeCRI) ListPodSandbox

func (*FakeCRI) PullImage

func (*FakeCRI) RunPodSandbox

func (*FakeCRI) StartContainer

type Postgres

type Postgres struct {
	DB         *postgres.DB
	Pool       *pgxpool.Pool
	ConnString string
}

func NewPostgres

func NewPostgres() *Postgres

func (*Postgres) CreateChunk

func (p *Postgres) CreateChunk(t *testing.T, c *chunk.Chunk)

CreateChunk inserts a chunk and all flavors. it also updates the passed object so that dynamically generated values of fields like id or created_at have the correct value.

func (*Postgres) CreateFlavor

func (p *Postgres) CreateFlavor(t *testing.T, chunkID string, f *chunk.Flavor)

CreateFlavor inserts a flavor. it also updates the passed object so that dynamically generated values of fields like id or created_at have the correct value.

func (*Postgres) CreateInstance

func (p *Postgres) CreateInstance(t *testing.T, nodeID string, ins *instance.Instance)

CreateInstance inserts an instance and the chunk as well as all flavors belonging to the chunk. it also updates the passed object so that dynamically generated values of fields like id or created_at have the correct value.

func (*Postgres) InsertNode

func (p *Postgres) InsertNode(t *testing.T)

func (*Postgres) Run

func (p *Postgres) Run(t *testing.T, ctx context.Context)

Jump to

Keyboard shortcuts

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