test

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

README

/test

Additional external test apps and test data. Feel free to structure the /test directory anyway you want. For bigger projects it makes sense to have a data subdirectory. For example, you can have /test/data or /test/testdata if you need Go to ignore what's in that directory. Note that Go will also ignore directories or files that begin with "." or "_", so you have more flexibility in terms of how you name your test data directory.

Examples:

Documentation

Overview

Copyright 2022 Nethermind

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFakeDep

func CreateFakeDep(t *testing.T, dependency string) (depPath string)

Creates an empty file in a temp dir with "dependency" as name and add temp dir to PATH. Return the path for the new dependency.

func DeleteFakeDep

func DeleteFakeDep(depPath string)

Remove the "depPath" from PATH.

func PrepareTestCaseDir

func PrepareTestCaseDir(srcPath, dstPath string) error

Copy all sub directory and files from "srcPath" to "dstPath" maintaining the same structure.

Types

type SimpleCMDRunner

type SimpleCMDRunner struct {
	SRunCMD  func(commands.Command) (string, int, error)
	SRunBash func(commands.ScriptFile) (string, error)
}

Struct for creating a commands.CommandRunner mocks

func (*SimpleCMDRunner) BuildCreateFileCMD added in v0.4.0

func (cr *SimpleCMDRunner) BuildCreateFileCMD(options commands.CreateFileOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerBuildCMD

func (cr *SimpleCMDRunner) BuildDockerBuildCMD(options commands.DockerBuildOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposeBuildCMD added in v1.0.0

func (cr *SimpleCMDRunner) BuildDockerComposeBuildCMD(options commands.DockerComposeBuildOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposeCreateCMD added in v1.0.0

func (cr *SimpleCMDRunner) BuildDockerComposeCreateCMD(options commands.DockerComposeCreateOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposeDownCMD

func (cr *SimpleCMDRunner) BuildDockerComposeDownCMD(options commands.DockerComposeDownOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposeLogsCMD

func (cr *SimpleCMDRunner) BuildDockerComposeLogsCMD(options commands.DockerComposeLogsOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposePSCMD

func (cr *SimpleCMDRunner) BuildDockerComposePSCMD(options commands.DockerComposePsOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposePullCMD added in v0.5.0

func (cr *SimpleCMDRunner) BuildDockerComposePullCMD(options commands.DockerComposePullOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposeUpCMD

func (cr *SimpleCMDRunner) BuildDockerComposeUpCMD(options commands.DockerComposeUpOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerComposeVersionCMD added in v1.0.0

func (cr *SimpleCMDRunner) BuildDockerComposeVersionCMD() commands.Command

func (*SimpleCMDRunner) BuildDockerInspectCMD

func (cr *SimpleCMDRunner) BuildDockerInspectCMD(options commands.DockerInspectOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerPSCMD

func (cr *SimpleCMDRunner) BuildDockerPSCMD(options commands.DockerPSOptions) commands.Command

func (*SimpleCMDRunner) BuildDockerPullCMD

func (cr *SimpleCMDRunner) BuildDockerPullCMD(options commands.DockerBuildOptions) commands.Command

func (*SimpleCMDRunner) BuildEchoToFileCMD added in v0.4.0

func (cr *SimpleCMDRunner) BuildEchoToFileCMD(options commands.EchoToFileOptions) commands.Command

func (*SimpleCMDRunner) BuildOpenTextEditor added in v1.0.0

func (cr *SimpleCMDRunner) BuildOpenTextEditor(options commands.OpenTextEditorOptions) commands.Command

func (*SimpleCMDRunner) RunCMD

func (cr *SimpleCMDRunner) RunCMD(cmd commands.Command) (string, int, error)

func (*SimpleCMDRunner) RunScript added in v0.6.0

func (cr *SimpleCMDRunner) RunScript(script commands.ScriptFile) (string, error)

Jump to

Keyboard shortcuts

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