test

package
v0.0.0-...-5c79d48 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadNotFound

func DownloadNotFound(t *testing.T, handler events.MultipartHandler)

DownloadNotFound tests handling of the scenario when download is not found

func Stream

func Stream(t *testing.T, handler events.MultipartHandler)

Stream tests stream upload and subsequent download and reads the results

func StreamManyParts

func StreamManyParts(t *testing.T, handler events.MultipartHandler)

StreamManyParts tests stream upload and subsequent download and reads the results

func StreamResumeManyParts

func StreamResumeManyParts(t *testing.T, handler events.MultipartHandler)

StreamResumeManyParts tests stream upload, failure to complete, resuming and subsequent download and reads the results.

func StreamResumeWithParameters

func StreamResumeWithParameters(t *testing.T, handler events.MultipartHandler, params StreamParams)

StreamResumeWithParameters expects initial complete attempt to fail but subsequent resume to succeed

func StreamSinglePart

func StreamSinglePart(t *testing.T, handler events.MultipartHandler)

StreamSinglePart tests stream upload and subsequent download and reads the results

func StreamWithParameters

func StreamWithParameters(t *testing.T, handler events.MultipartHandler, params StreamParams)

StreamWithParameters tests stream upload and subsequent download and reads the results

func UploadDownload

func UploadDownload(t *testing.T, handler events.MultipartHandler)

UploadDownload tests uploads and downloads

Types

type EventsSuite

type EventsSuite struct {
	Log        events.AuditLogger
	Clock      clockwork.Clock
	QueryDelay time.Duration

	// SearchSessionEvensBySessionIDTimeout is used to specify timeout on query
	// in SearchSessionEvensBySessionID test case.
	SearchSessionEvensBySessionIDTimeout time.Duration
}

EventsSuite is a conformance test suite to verify external event backends

func (*EventsSuite) EventPagination

func (s *EventsSuite) EventPagination(t *testing.T)

EventPagination covers event search pagination.

func (*EventsSuite) SearchSessionEventsBySessionID

func (s *EventsSuite) SearchSessionEventsBySessionID(t *testing.T)

func (*EventsSuite) SessionEventsCRUD

func (s *EventsSuite) SessionEventsCRUD(t *testing.T)

SessionEventsCRUD covers session events

type MockAuditLogSessionStreamer

type MockAuditLogSessionStreamer struct {
	events.DiscardAuditLog
	// contains filtered or unexported fields
}

func NewMockAuditLogSessionStreamer

func NewMockAuditLogSessionStreamer(events []apievents.AuditEvent, verifyRequest func(events.SearchEventsRequest) error) *MockAuditLogSessionStreamer

func (*MockAuditLogSessionStreamer) SearchEvents

SearchEvents implements events.AuditLogSessionStreamer

type StreamParams

type StreamParams struct {
	// PrintEvents is amount of print events to generate
	PrintEvents int64
	// ConcurrentUploads is amount of concurrent uploads
	ConcurrentUploads int
	// MinUploadBytes is minimum required upload bytes
	MinUploadBytes int64
}

StreamParams configures parameters of a stream test suite

Jump to

Keyboard shortcuts

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