configtest

package
v0.0.0-...-57fe098 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package configtest provides utililities to help driver developers test their integration with Grit's configuration system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestSourceDriver

func TestSourceDriver(
	r sourcedriver.Registration,
	zero sourcedriver.Config,
	deps []vcsdriver.Registration,
	tests ...SourceDriverTest,
)

TestSourceDriver runs a series of tests

func TestVCSDriver

func TestVCSDriver(
	r vcsdriver.Registration,
	zero vcsdriver.Config,
	tests ...VCSDriverTest,
)

TestVCSDriver runs a series of tests

Types

type SourceDriverTest

type SourceDriverTest = ginkgo.TableEntry

SourceDriverTest is a test that tests source driver configuration.

func SourceFailure

func SourceFailure(
	description string,
	content string,
	expect string,
) SourceDriverTest

SourceFailure returns a test that tests a source driver configuration that is expected to fail.

func SourceSuccess

func SourceSuccess(
	description string,
	content string,
	expect sourcedriver.Config,
) SourceDriverTest

SourceSuccess returns a test that tests a source driver configuration that is expected to pass.

type VCSDriverTest

type VCSDriverTest = ginkgo.TableEntry

VCSDriverTest is a test that tests VCS driver configuration.

func VCSFailure

func VCSFailure(
	description string,
	content string,
	expect string,
) VCSDriverTest

VCSFailure returns a test that tests a VCS driver configuration that is expected to fail.

func VCSSourceSpecificSuccess

func VCSSourceSpecificSuccess(
	description string,
	defaultContent string,
	sourceSpecificContent string,
	expect vcsdriver.Config,
) VCSDriverTest

VCSSourceSpecificSuccess returns a test that tests a source-specific VCS driver configuration that is expected to pass.

func VCSSuccess

func VCSSuccess(
	description string,
	defaultContent string,
	expect vcsdriver.Config,
) VCSDriverTest

VCSSuccess returns a test that tests a default VCS driver configuration that is expected to pass.

Jump to

Keyboard shortcuts

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