testutils

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationConfigPath = "/testutils/testdata/sample_config.json"    // AplicationConfigPath points to dummy config file in json format for NucleusConfig
	TaskPayloadPath       = "/testutils/testdata/taskPayload.json"      // TaskPayloadPath points to json file containing dummy TaskPayload
	PayloadPath           = "/testutils/testdata/payload.json"          // PayloadPath points to json file containing dummy PayloadPath
	GitlabCommitDiff      = "/testutils/testdata/gitlabCommitDiff.json" // GitLabCommitDiff points to json file containing dummy GitLabCommitDiff
)

Various constant defined for to obtain dummy data for tests

Variables

This section is empty.

Functions

func GetConfig

func GetConfig() (*config.NucleusConfig, error)

GetConfig returns a dummy NucleusConfig using the json file pointed by ApplicationConfigPath

func GetGitlabCommitDiff

func GetGitlabCommitDiff() ([]byte, error)

GetGitlabCommitDiff returns a dummy GitlabCommitDiff as slice of byte data.

func GetLogger

func GetLogger() (lumber.Logger, error)

GetLogger returns a dummy lumber.Logger.

func GetPayload

func GetPayload() (*core.Payload, error)

GetPayload returns a dummy core.Payload using the json file pointed by PayloadPath.

func GetTaskPayload

func GetTaskPayload() (*core.TaskPayload, error)

GetTaskPayload returns a dummy core.TaskPayload using the json file pointed by TaskPayloadPath

func LoadFile

func LoadFile(relativePath string) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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