Documentation ¶
Index ¶
Constants ¶
View Source
const ( MockSCPPath = "/usr/bin/scp" MockSSHPath = "/usr/bin/ssh" MockSSHPassPath = "/usr/bin/sshpass" // #nosec G101 MockSSHPassword = "hunter2" MockSSHPassphrase = "correct horse battery staple" MockIdentityFileContents = "-----BEGIN OPENSSH PRIVATE KEY-----" WantFilePermissions = os.FileMode(0o600) )
The constants here are used by both the SCP & SSH Plugins for testing.
Variables ¶
This section is empty.
Functions ¶
func ArgCompare ¶
ArgCompare will allow us to compare some command line arguments to validate they match what we'd expect. We can't directly use a reflect.DeepEqual because of some randomized file names/suffixes.
func CreateMockFiles ¶
CreateMockFiles will create an in memory file system along with any arbitrary named empty files for testing.
func FlattenArguments ¶
func FlattenArguments(args ...interface{}) (flatArgs []string)
FlattenArguments is a helper to smash together strings and string slices into a flat string slice for testing purposes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.