checks

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package checks implements functions that verify conditions in a cluster

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check added in v0.3.2

type Check interface {
	// Verify asserts is the check is satisfied or some error occurs
	Verify(k8s kubernetes.Kubernetes, ingress string, namespace string) error
}

Check defines an interface for verifying conditions in a test

type GrpcCheck added in v0.3.2

type GrpcCheck struct {
	// Service name
	Service string
	// Port to access the service (default 3000)
	Port int
	// Grpc service to invoke
	GrpcService string
	// Method to invoke
	Method string
	// Request message
	Request []byte
	// Expected return code (default OK)
	ExpectedStatus int32
	// Delay before attempting access to service
	Delay time.Duration
}

GrpcCheck defines the operation and conditions to check in the access to a service

func (GrpcCheck) Verify added in v0.3.2

func (c GrpcCheck) Verify(_ kubernetes.Kubernetes, ingress string, namespace string) error

Verify verifies a GrpcServiceCheck

type HTTPCheck added in v0.3.2

type HTTPCheck struct {
	// Service name
	Service string
	// Port to access the service (default 80)
	Port int
	// Request Method (default GET)
	Method string
	// Request body
	Body []byte
	// request path
	Path string
	// Expected return code (default 200)
	ExpectedCode int
	// Delay before attempting access to service
	Delay time.Duration
}

HTTPCheck defines the operation and conditions to check in the access to a service TODO: add support for passing headers to the request TODO: add checks for expected response body

func (HTTPCheck) Verify added in v0.3.2

func (c HTTPCheck) Verify(_ kubernetes.Kubernetes, ingress string, namespace string) error

Verify verifies a HTTPCheck

Jump to

Keyboard shortcuts

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