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

Fix small issues due latest change #453

Merged
merged 1 commit into from
Oct 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ install:
go install

test:
go test -v -covermode=count -coverprofile=profile.cov . ./libvirt

go test -v -covermode=count -coverprofile=profile.cov ./libvirt
go test -v .
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will run the unit-test we don\t need for such feature a profile.cov

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to split in 2 otherwise it doesn't work

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to split in 2 otherwise it doesn't work

What error do you see? For me:

$ git describe --always --abbrev=40 --dirty
fe5737439750f97f4e1816cf59e90066529f2e72
$ make test
go test -v -covermode=count -coverprofile=profile.cov . ./libvirt
=== RUN   TestPrintVersion
--- PASS: TestPrintVersion (0.32s)
PASS
coverage: 62.2% of statements
ok  	github.com/dmacvicar/terraform-provider-libvirt	0.335s	coverage: 62.2% of statements
...
=== RUN   TestAccLibvirtCloudInit_CreateCloudInitDiskAndUpdate
--- FAIL: TestAccLibvirtCloudInit_CreateCloudInitDiskAndUpdate (0.00s)
panic: interface conversion: interface {} is nil, not *libvirt.Client [recovered]
	panic: interface conversion: interface {} is nil, not *libvirt.Client

goroutine 67 [running]:
testing.tRunner.func1(0xc420460000)
	/home/trking/.local/go/src/testing/testing.go:742 +0x29d
panic(0xdfdea0, 0xc420446180)
	/home/trking/.local/go/src/runtime/panic.go:502 +0x229
github.com/dmacvicar/terraform-provider-libvirt/libvirt.TestAccLibvirtCloudInit_CreateCloudInitDiskAndUpdate(0xc420460000)
	/home/trking/.local/lib/go/src/github.com/dmacvicar/terraform-provider-libvirt/libvirt/resource_libvirt_cloud_init_test.go:24 +0x127b
testing.tRunner(0xc420460000, 0xf5d7b0)
	/home/trking/.local/go/src/testing/testing.go:777 +0xd0
created by testing.(*T).Run
	/home/trking/.local/go/src/testing/testing.go:824 +0x2e0
FAIL	github.com/dmacvicar/terraform-provider-libvirt/libvirt	24.031s
make: *** [test] Error 1

But I see that same panic on your 21c6b8b too.

Copy link
Collaborator Author

@MalloZup MalloZup Oct 18, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yop the panic is not important. Actually it should not be scheduled that test in the unittest but in acceptance only I still dunno why it land there

I have an error which complain about the cover profile, which golang version are you using at moment? I think that the thing is maybe changed with higher versions of golang..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have an error which complain about the cover profile, which golang version are you using at moment? I think that the thing is maybe changed with higher versions of golang..

$ go version
go version go1.10.3 linux/amd64

testacc:
go test -v .
./travis/run-tests-acceptance

vet:
Expand Down