{"action":"closed","issue":{"url":"https://api.github.com/repos/spf13/hugo/issues/919","repository_url":"https://api.github.com/repos/spf13/hugo","labels_url":"https://api.github.com/repos/spf13/hugo/issues/919/labels{/name}","comments_url":"https://api.github.com/repos/spf13/hugo/issues/919/comments","events_url":"https://api.github.com/repos/spf13/hugo/issues/919/events","html_url":"https://github.com/spf13/hugo/issues/919","id":58472656,"number":919,"title":"Improve test build config and README","user":{"login":"owenwaller","id":1481655,"avatar_url":"https://avatars.githubusercontent.com/u/1481655?v=3","gravatar_id":"","url":"https://api.github.com/users/owenwaller","html_url":"https://github.com/owenwaller","followers_url":"https://api.github.com/users/owenwaller/followers","following_url":"https://api.github.com/users/owenwaller/following{/other_user}","gists_url":"https://api.github.com/users/owenwaller/gists{/gist_id}","starred_url":"https://api.github.com/users/owenwaller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owenwaller/subscriptions","organizations_url":"https://api.github.com/users/owenwaller/orgs","repos_url":"https://api.github.com/users/owenwaller/repos","events_url":"https://api.github.com/users/owenwaller/events{/privacy}","received_events_url":"https://api.github.com/users/owenwaller/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spf13/hugo/labels/kind/docs","name":"kind/docs","color":"A37049"},{"url":"https://api.github.com/repos/spf13/hugo/labels/kind/enhancement","name":"kind/enhancement","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"bep","id":394382,"avatar_url":"https://avatars.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2015-02-21T20:00:11Z","updated_at":"2016-04-09T11:52:23Z","closed_at":"2016-04-09T11:52:23Z","body":"@bep and any one else who can chip in...\r\n\r\n[To avoid any doubt, the HEAD of master was @ dc7b7ef865f5ba568702e867a29408e7f1a25be7 as I write this.]\r\n\r\nSorry, @bep but git tells me that you made change 5f9596e68c55830d046de3faa88ab0a8f68fcf76 which added the `src/github.com/spf13/` into the `helpers/content_test.go` file.\r\n\r\nOK I am seeing something very weird on hugos master branch at the minute. And I'm seeing this both on my usual linux box and a mac. So that rules out any kind of weird package corruption $GOAPTH on the linux side.\r\n\r\nBut, basically we do not appear to be pulling all of the test dependences for hugo when the `-t` flag is passed to the `go get` command.\r\n\r\nNote: I am using a temp. $GOPATH so as not to mess up my normal environment, and so that I can keep this as a clean install.(*)\r\n\r\nThe sequence to reproduce this is:\r\n````\r\ncd /tmp\r\nmkdir go-src\r\nexport GOPATH=/tmp/go-src\r\nmkdir -p src/github.com/spf13/\r\ncd src/github.com/spf13/\r\ngit clone http://github.com/spf13/hugo\r\ncd hugo\r\ngo get -v -t -d github.com/spf13/hugo\r\ngo test ./...\r\n````\r\nand you should get the error:\r\n````\r\n# _/tmp/hugo/helpers\r\nhelpers/content_test.go:4:2: cannot find package \"github.com/stretchr/testify/assert\" in any of:\r\n\t/home/owen/golang/go/src/github.com/stretchr/testify/assert (from $GOROOT)\r\n\t/home/owen/go/src/github.com/stretchr/testify/assert (from $GOPATH)\r\nFAIL\t_/tmp/hugo/helpers [setup failed]\r\n# _/tmp/hugo/hugolib\r\nhelpers/content_test.go:4:2: cannot find package \"github.com/stretchr/testify/assert\" in any of:\r\n\t/home/owen/golang/go/src/github.com/stretchr/testify/assert (from $GOROOT)\r\n\t/home/owen/go/src/github.com/stretchr/testify/assert (from $GOPATH)\r\nFAIL\t_/tmp/hugo/hugolib [setup failed]\r\n# _/tmp/hugo/tpl\r\nhelpers/content_test.go:4:2: cannot find package \"github.com/stretchr/testify/assert\" in any of:\r\n\t/home/owen/golang/go/src/github.com/stretchr/testify/assert (from $GOROOT)\r\n\t/home/owen/go/src/github.com/stretchr/testify/assert (from $GOPATH)\r\nFAIL\t_/tmp/hugo/tpl [setup failed]\r\n?   \t_/tmp/hugo\t[no test files]\r\n?   \t_/tmp/hugo/bufferpool\t[no test files]\r\nok  \t_/tmp/hugo/commands\t0.012s\r\n?   \t_/tmp/hugo/create\t[no test files]\r\n?   \t_/tmp/hugo/hugofs\t[no test files]\r\n?   \t_/tmp/hugo/livereload\t[no test files]\r\nok  \t_/tmp/hugo/parser\t0.008s\r\nok  \t_/tmp/hugo/source\t0.025s\r\nok  \t_/tmp/hugo/target\t0.013s\r\nok  \t_/tmp/hugo/transform\t0.018s\r\nok  \t_/tmp/hugo/utils\t0.003s\r\n?   \t_/tmp/hugo/watcher\t[no test files]\r\n````\r\nBut now if you do\r\n````\r\ngo get -v -t -d github.com/spf13/hugo/helpers\r\n````\r\nYou'll see that the required test package dependency is downloaded. `go get`ing the `hugo/helpers` package is deliberate. That's the package that just failed to setup its tests. So if you now do\r\n````\r\ngo test ./...\r\n````\r\nThen the missing dependency is resolved and the tests pass.\r\n\r\nSo for some reason the hugo helpers package is not pulling all of its test package dependencies.\r\n\r\n(*) I just checked, and provided I `rm -rf` any  `github.com/stretchr/testify` beforehand in both `$GOPATH/src` and `GOPATH/pkg/<arch>/stretchr/testify` in my normal/system wide `$GOAPTH` I see the same behaviour. So this doesn't appear to be related to redefining $GOPATH.\r\n\r\nCan anyone explain to me just what the is going on here? Is this a problem with the external package, hugo's helper package or go's get command? Can someone see if they can reproduce this please?\r\n\r\nThanks\r\n\r\nOwen\r\n"}}