testconfig

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package testconfig provides utilities for creating and managing test configuration files for the uncloak application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConfigFile

func CreateConfigFile(t *testing.T, dir string, content TestYamlFile) string

CreateConfigFile creates a .uncloak.yml configuration file with the specified content in the given directory.

Types

type TestYamlFile

type TestYamlFile string

TestYamlFile represents a test YAML configuration file.

const (
	// ValidYaml represents a valid test YAML configuration file.
	ValidYaml TestYamlFile = `
version: 0
exclusions:
  - "main.go"
  - "**/internal/**"
`

	// InvalidEmptyYaml represents an invalid test YAML configuration file that
	// is empty.
	InvalidEmptyYaml TestYamlFile = ""

	// InvalidCoverageThresholdYaml represents an invalid test YAML
	// configuration file with a negative coverage threshold.
	InvalidCoverageThresholdYaml TestYamlFile = `
version: 0
coverage-threshold: -10.0
`

	// InvalidUnknownFieldYaml represents an invalid test YAML configuration
	// file with an unknown field.
	InvalidUnknownFieldYaml TestYamlFile = `
version: 0
unknown-field: true
`
)

Jump to

Keyboard shortcuts

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