Documentation
¶
Index ¶
- func ColumnToLetter(col int) string
- func ConvertVMDKtoQCOW2(src string, dst string) error
- func CreateExcelOnlyWithVInfo() ([]byte, error)
- func CreateLargeExcel() ([]byte, error)
- func CreateTempExcelFile(content []byte) (string, error)
- func CreateValidTestExcel() ([]byte, error)
- func DefaultUserAuth() *auth.User
- func GetToken(credentials *auth.User) (string, error)
- func LogExecutionSummary()
- func RemoveFile(fullPath string) error
- func RunLocalCommand(command string) (string, error)
- func RunSSHCommand(ip string, command string) (string, error)
- func Untar(file *os.File, destFile string, fileName string) error
- func UserAuth(user string, org string, emailDomain string) *auth.User
- func ValidateTar(file *os.File) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ColumnToLetter ¶ added in v0.3.0
Helper function to convert column index to Excel column letter
func ConvertVMDKtoQCOW2 ¶
ConvertVMDKtoQCOW2 converts a VMDK file to QCOW2 using qemu-img
func CreateExcelOnlyWithVInfo ¶ added in v0.3.0
func CreateLargeExcel ¶ added in v0.3.0
func CreateTempExcelFile ¶ added in v0.3.0
Helper function to create a temporary Excel file for testing
func CreateValidTestExcel ¶ added in v0.3.0
func DefaultUserAuth ¶
DefaultUserAuth returns an auth.User object with the default username and organization.
func GetToken ¶
GetToken retrieves the private key from the specified path, parses it, and then generates a token for the given credentials using the private key. Returns the token or an error.
func LogExecutionSummary ¶
func LogExecutionSummary()
LogExecutionSummary logs the execution time of all tests stored in the TestsExecutionTime map. It sorts the tests by duration in descending order and logs the test name along with its execution duration.
func RunLocalCommand ¶
RunLocalCommand runs the given shell command locally and returns its combined output or error
func RunSSHCommand ¶
RunSSHCommand executes a command on a remote machine over SSH using sshpass for authentication. It takes an IP address and a command string as parameters, runs the command on the remote machine, and returns the command's output (stdout) as a string, or an error if the command fails.
func Untar ¶
Untar extracts a specific file (identified by 'fileName') from a tar file and writes it to the 'destFile' path. If the specified file is found, it is extracted and written; otherwise, an error is returned indicating that the file was not found in the tar archive.
func ValidateTar ¶
ValidateTar validates a tar file by checking if it contains at least one file with the following suffixes: .ovf, .vmdk, and .iso. It also performs basic validation on the .ovf file to ensure it contains essential elements like <Envelope> and <VirtualSystem>. Returns an error if any of these conditions are not met
Types ¶
This section is empty.