mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-02-06 21:46:34 +00:00
* feat: rename internal/errors to internal/apperrors * fix(tests): clear env values before using in tests * feat: rename internal/errors to internal/apperrors * chore(deps): update go and all dependencies * chore: remove renovate from pre-commit, formatting * chore: sonarcloud fixes * feat: consolidate constants to appconstants/constants.go * chore: sonarcloud fixes * feat: simplification, deduplication, test utils * chore: sonarcloud fixes * chore: sonarcloud fixes * chore: sonarcloud fixes * chore: sonarcloud fixes * chore: clean up * fix: config discovery, const deduplication * chore: fixes
73 lines
2.4 KiB
Go
73 lines
2.4 KiB
Go
package appconstants
|
|
|
|
// This file contains constants used exclusively for testing.
|
|
// These are separated from production constants to:
|
|
// - Reduce API surface pollution in the main constants file
|
|
// - Make it clear which constants are test-only
|
|
// - Improve code organization and maintainability
|
|
//
|
|
// Note: These constants must remain exported so they can be used by
|
|
// test files in other packages (e.g., internal/*_test.go, main_test.go).
|
|
|
|
// Test assertion message format templates.
|
|
const (
|
|
// TestMsgExitCode is the format for exit code mismatch assertions.
|
|
TestMsgExitCode = "expected exit code %d, got %d"
|
|
|
|
// TestMsgStdout is the format for standard output logging.
|
|
TestMsgStdout = "stdout: %s"
|
|
|
|
// TestMsgStderr is the format for standard error logging.
|
|
TestMsgStderr = "stderr: %s"
|
|
)
|
|
|
|
// Test fixture path constants.
|
|
const (
|
|
// JavaScript action fixtures.
|
|
TestFixtureJavaScriptSimple = "actions/javascript/simple.yml"
|
|
|
|
// Composite action fixtures.
|
|
TestFixtureCompositeBasic = "actions/composite/basic.yml"
|
|
TestFixtureCompositeWithDeps = "actions/composite/with-dependencies.yml"
|
|
|
|
// Docker action fixtures.
|
|
TestFixtureDockerBasic = "actions/docker/basic.yml"
|
|
|
|
// Invalid action fixtures.
|
|
TestFixtureInvalidMissingDescription = "actions/invalid/missing-description.yml"
|
|
TestFixtureInvalidInvalidUsing = "actions/invalid/invalid-using.yml"
|
|
|
|
// Minimal/other fixtures.
|
|
TestFixtureMinimalAction = "minimal-action.yml"
|
|
TestFixtureProfessionalConfig = "professional-config.yml"
|
|
TestFixtureTestCompositeAction = "test-composite-action.yml"
|
|
TestFixtureMyNewAction = "my-new-action.yml"
|
|
)
|
|
|
|
// Test file path constants.
|
|
const (
|
|
TestPathActionYML = "action.yml"
|
|
TestPathActionYAML = "action.yaml"
|
|
TestPathConfigYML = "config.yml"
|
|
TestPathCustomConfigYML = "custom-config.yml"
|
|
TestPathNonexistentYML = "nonexistent.yml"
|
|
)
|
|
|
|
// Test directory path constants.
|
|
const (
|
|
TestDirSubdir = "subdir"
|
|
TestDirActions = "actions"
|
|
TestDirActionsDeploy = "actions/deploy"
|
|
TestDirActionsTest = "actions/test"
|
|
TestDirActionsComposite = "actions/composite"
|
|
TestDirActionsDocker = "actions/docker"
|
|
TestDirNested = "nested"
|
|
TestDirNestedDeep = "nested/deep"
|
|
|
|
// Config directories.
|
|
TestDirConfigGhActionReadme = ".config/gh-action-readme"
|
|
TestDirDotConfig = ".config"
|
|
TestDirDotGitHub = ".github"
|
|
TestDirCacheGhActionReadme = ".cache/gh-action-readme"
|
|
)
|