forked from vmware-archive/vsphere-storage-for-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_e2e_test.go
20 lines (15 loc) · 865 Bytes
/
sample_e2e_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)
}