forked from vmware-archive/vsphere-storage-for-docker
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supplying ssh keys and env variable to container for e2e testing
adding missing pkg and sample test file a minor fix for CI to consume key from correct location correcting CI faiure reading SSH_KEY_OPT correctly code cleanup restarting CI run Adding support SSH_KEY_PATH for local test run, no need to set environment vars any more Adding target for e2e tests (addressing Ritesh's comment) Fix Admin Cli command to list selected columns for Filesystem Type an… (vmware-archive#845) * Fix Admin Cli command to list selected columns for Filesystem Type and Disk Format adding new test target @test-All
- Loading branch information
1 parent
51b3b92
commit 00b5fc0
Showing
4 changed files
with
49 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package e2e_test | ||
|
||
import "testing" | ||
import "os/exec" | ||
import "fmt" | ||
import "os" | ||
import "strings" | ||
|
||
//TODO: This is a sample testcase and will be removed after finishing the review. | ||
|
||
func TestSomething(t *testing.T) { | ||
var err error | ||
var out []byte | ||
|
||
out, err = exec.Command("/usr/bin/ssh", strings.Split(os.Getenv("SSH_KEY_OPT")," ")[0], strings.Split(os.Getenv("SSH_KEY_OPT")," ")[1], "-q", "-kTax", "-o StrictHostKeyChecking=no", "root@"+os.Getenv("ESX"), "/usr/lib/vmware/vmdkops/bin/vmdkops_admin.py", "ls").CombinedOutput() | ||
fmt.Printf("\nerr=>%s.....\nout=>%s", err, out) | ||
|
||
out, err = exec.Command("/usr/bin/ssh", strings.Split(os.Getenv("SSH_KEY_OPT")," ")[0], strings.Split(os.Getenv("SSH_KEY_OPT")," ")[1], "-q", "-kTax", "-o StrictHostKeyChecking=no", "root@"+os.Getenv("VM1"), "ifconfig").CombinedOutput() | ||
fmt.Printf("\nerr=>%s .....\nout=>%s", err, out) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters