testutils

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package testutils provides helper functions and types for testing the shrink application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunScenario

func RunScenario(t *testing.T, s Scenario, runCmd func(dbPath, tempDir string, args []string) error)

Types

type ExpectedDBRecord

type ExpectedDBRecord struct {
	Path        string
	TimeDeleted int64
	IsShrinked  int
}

type Scenario

type Scenario struct {
	Description   string
	CLIArgs       []string
	InputFiles    []TestFile
	Archives      []TestArchive
	ExpectFiles   []string
	ExpectMissing []string
	ExpectDBState []ExpectedDBRecord
}

type TestArchive

type TestArchive struct {
	Name    string
	SrcPath string
}

type TestFile

type TestFile struct {
	Name      string
	SrcPath   string // Path to tiny media in testdata
	MediaType string
}

TestFile represents a file used in natural language testing scenarios

Jump to

Keyboard shortcuts

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