Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go tests for travis #6

Open
weldpua2008 opened this issue May 13, 2016 · 0 comments
Open

Go tests for travis #6

weldpua2008 opened this issue May 13, 2016 · 0 comments

Comments

@weldpua2008
Copy link
Contributor

weldpua2008 commented May 13, 2016

Hi,

I tried to add run tests in travis and it failed.
I created the VagrantFile to do tests manually but there are issues.
Please advice how to run tests:

My preparation steps

git clone https://github.com/weldpua2008/deployer.git
cd deployer
vagrant up
vagrant ssh
sudo -i
cd /opt/gopath/src/github.com/dorzheh/deployer/

Run the tests
root@precise64:/opt/gopath/src/github.com/dorzheh/deployer# go test ./...
The result

# github.com/dorzheh/deployer/builder/image
builder/image/image_test.go:53: unknown Utils field 'Grub' in struct literal
builder/image/image_test.go:90: img.CleanupPre undefined (type *image has no field or method CleanupPre)
builder/image/image_test.go:102: img.CleanupPost undefined (type *image has no field or method CleanupPost)
builder/image/image_test.go:147: img.CleanupPre undefined (type *image has no field or method CleanupPre)
builder/image/image_test.go:159: img.CleanupPost undefined (type *image has no field or method CleanupPost)
?       github.com/dorzheh/deployer     [no test files]
?       github.com/dorzheh/deployer/builder     [no test files]
?       github.com/dorzheh/deployer/builder/content     [no test files]
FAIL    github.com/dorzheh/deployer/builder/image [build failed]
?       github.com/dorzheh/deployer/config      [no test files]
# github.com/dorzheh/deployer/config/metadata/libvirt/libvirt_kvm
config/metadata/libvirt/libvirt_kvm/cpu_tune_config_test.go:13: cannot use numas (type map[int][]string) as type []*guest.NUMA in argument to setCpuTuneData
config/metadata/libvirt/libvirt_kvm/network_config_test.go:151: not enough arguments in call to d.SetNetworkData
config/metadata/libvirt/libvirt_kvm/network_config_test.go:224: not enough arguments in call to d.SetNetworkData
config/metadata/libvirt/libvirt_kvm/network_config_test.go:297: not enough arguments in call to d.SetNetworkData
config/metadata/libvirt/libvirt_kvm/network_config_test.go:373: not enough arguments in call to d.SetNetworkData
config/metadata/libvirt/libvirt_kvm/network_config_test.go:447: not enough arguments in call to d.SetNetworkData
config/metadata/libvirt/libvirt_kvm/network_config_test.go:523: not enough arguments in call to d.SetNetworkData
config/metadata/libvirt/libvirt_kvm/storage_config_test.go:71: not enough arguments in call to d.SetStorageData
--- FAIL: TestParseConfig (0.00s)
        parser_test.go:57: expected amount of RAM is 4096, got 0
FAIL
FAIL    github.com/dorzheh/deployer/config/bundle       0.114s
?       github.com/dorzheh/deployer/config/common       [no test files]
?       github.com/dorzheh/deployer/config/metadata     [no test files]
FAIL    github.com/dorzheh/deployer/config/metadata/libvirt/libvirt_kvm [build failed]
?       github.com/dorzheh/deployer/config/metadata/openxen/xen_xl      [no test files]
ok      github.com/dorzheh/deployer/config/xmlinput     0.109s
?       github.com/dorzheh/deployer/controller  [no test files]
--- FAIL: TestCreateDestroyRemoteCommonArtifact (2.62s)
        artifact_test.go:48: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
                TRACE: github.com/dorzheh/deployer/utils.RunFunc.func2[runfunc.go:35]
                TRACE: github.com/dorzheh/deployer/deployer.(*CommonArtifact).Destroy[artifact.go:64]
FAIL
FAIL    github.com/dorzheh/deployer/deployer    2.820s
--- FAIL: TestEmulator (0.06s)
        driver_test.go:12: executing virsh capabilities  : /bin/bash: virsh: command not found
                 [exit status 127]
                TRACE: github.com/dorzheh/deployer/drivers/env_driver/libvirt/libvirt_kvm.(*Driver).Emulator[driver.go:99]
--- FAIL: TestVersion (0.16s)
        driver_test.go:27: executing virsh version|grep "Using library"  : /bin/bash: virsh: command not found
                 [exit status 1]
                TRACE: github.com/dorzheh/deployer/drivers/env_driver/libvirt/libvirt_kvm.(*Driver).Version[driver.go:120]
AllCPUsPinned result : true
FAIL
FAIL    github.com/dorzheh/deployer/drivers/env_driver/libvirt/libvirt_kvm      0.448s
--- FAIL: TestVersion (0.12s)
        driver_test.go:12: executing xl info|grep xen_version  : /bin/bash: xl: command not found
                 [exit status 1]
                TRACE: github.com/dorzheh/deployer/drivers/env_driver/openxen/xen_xl.(*Driver).Version[driver.go:84]
FAIL
FAIL    github.com/dorzheh/deployer/drivers/env_driver/openxen/xen_xl   0.221s
?       github.com/dorzheh/deployer/drivers/hwinfo_driver/libvirt       [no test files]
?       github.com/dorzheh/deployer/drivers/hwinfo_driver/openxen       [no test files]
?       github.com/dorzheh/deployer/example/myproduct/common    [no test files]
?       github.com/dorzheh/deployer/example/myproduct/deployer  [no test files]
?       github.com/dorzheh/deployer/example/myproduct/env/libvirt/kvm   [no test files]
?       github.com/dorzheh/deployer/example/myproduct/env/openxen       [no test files]
?       github.com/dorzheh/deployer/post_processor/libvirt/libvirt_kvm  [no test files]
?       github.com/dorzheh/deployer/post_processor/openxen/xen_xl       [no test files]
?       github.com/dorzheh/deployer/ui  [no test files]
?       github.com/dorzheh/deployer/ui/dialog_ui        [no test files]
ok      github.com/dorzheh/deployer/utils       0.048s
?       github.com/dorzheh/deployer/utils/host_hwfilter [no test files]
ok      github.com/dorzheh/deployer/utils/hwinfo/guest  0.116s
===> executing lshw locally,writing info file
===> parsing info file #1
===> parsing info file #2
===> CPUs: 2
===> executing lshw remotely,writing info file
--- FAIL: TestCPUInfoRemote (1.95s)
        hwinfo_test.go:62:  [ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
                TRACE: github.com/dorzheh/deployer/utils.RunFunc.func2[runfunc.go:35]]
                TRACE: github.com/dorzheh/deployer/utils/hwinfo/host.prepareFunc.func1[hwinfo.go:408]
                TRACE: github.com/dorzheh/deployer/utils/hwinfo/host.(*Collector).Hwinfo2Json[hwinfo.go:38]
===> executing lshw locally,writing info file
===> parsing info file #1
===> parsing info file #2
==== Slice Content ======
NIC type => physical
NIC name => eth0
NIC PCI addr => 0000:00:03.0
NIC vendor => Intel Corporation
NIC model => 82540EM Gigabit Ethernet Controller
NIC desc => Intel Corporation 82540EM Gigabit Ethernet Controller
NIC driver => e1000
NUMA node => 0
==================
===> executing lshw remotely,writing info file
--- FAIL: TestNICInfoRemote (1.98s)
        hwinfo_test.go:122:  [ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
                TRACE: github.com/dorzheh/deployer/utils.RunFunc.func2[runfunc.go:35]]
                TRACE: github.com/dorzheh/deployer/utils/hwinfo/host.prepareFunc.func1[hwinfo.go:408]
                TRACE: github.com/dorzheh/deployer/utils/hwinfo/host.(*Collector).Hwinfo2Json[hwinfo.go:38]
===> NUMA node 0 => CPUs &{0 1048060 281772 [0 1]}
--- FAIL: TestNUMANodesRemote (1.92s)
        hwinfo_test.go:171: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
                TRACE: github.com/dorzheh/deployer/utils.RunFunc.func2[runfunc.go:35]
                TRACE: github.com/dorzheh/deployer/utils/hwinfo/host.(*Collector).NUMANodes[hwinfo.go:328]
===> local ramsize = 995 --- FAIL: TestRAMSizeRemote (1.89s)
        hwinfo_test.go:197: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password], no supported methods remain
                TRACE: github.com/dorzheh/deployer/utils.RunFunc.func2[runfunc.go:35]
                TRACE: github.com/dorzheh/deployer/utils/hwinfo/host.(*Collector).RAMSize[hwinfo.go:309]
FAIL
FAIL    github.com/dorzheh/deployer/utils/hwinfo/host   14.564s
ok      github.com/dorzheh/deployer/utils/sysinfo       0.288s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant