Testing framork problem

After running for a few weeks my testing configuration with latest Goland got broken. The initialization of tests ends up with “Test framework quit unexpectedly” and run window is filled with a few dozens of libraries packages that cannot be found. Some of them have no business to be install to the best of my knowledge. I did not change any configuration of my dev environment, neither root nor path, did not delete anything and did not install anything radical. I reinstall the GoLand, wiping the local cache and settings but the problem persists. All the rest functionality with exception of testing framework work perfectly fine.

11 comments
Comment actions Permalink

Hi,

Unfortunately, the information you provide doesn't help to understand the problem. Let's start with the version of GoLand you use and version of Go.

Also, it makes sense to copy all command line that GoLand prints while running tests (including #gosetup ones) and invoke them in terminal. Does the problem persist?

0
Comment actions Permalink

Sure, the Go is 1.10.2, the GoLand is 2018.2. There is no commands that are trying  to be executed, the initialization of enter testing framework looks like failing.

0
Comment actions Permalink

Could you attach the screenshot, please?

0
Comment actions Permalink

Sure. The only successful run might be setting the test cofig in file mode but as soon I wide it to directory mode then pick bunch of superfluous packages that should not there. The build and run in directory mode works fine. Still am trying fine out how to attach the image…

0
Comment actions Permalink

GOROOT=C:\Go #gosetup

GOPATH=C:\Go\src;C:\Users\rbessnow\go\src\SSL #gosetup

"C:\Program Files\JetBrains\GoLand 2018.2\bin\runnerw.exe" C:\Go\bin\go.exe test -json ./... #gosetup

src\cloud.google.com\go\speech\apiv1beta1\speech_client.go:29:2: cannot find package "google.golang.org/genproto/googleapis/cloud/speech/v1beta1" in any of:

                C:\Go\src\google.golang.org\genproto\googleapis\cloud\speech\v1beta1 (from $GOROOT)

                C:\Go\src\src\google.golang.org\genproto\googleapis\cloud\speech\v1beta1 (from $GOPATH)

                C:\Users\rbessnow\go\src\SSL\src\google.golang.org\genproto\googleapis\cloud\speech\v1beta1

0
Comment actions Permalink

> GOPATH=C:\Go\src;C:\Users\rbessnow\go\src\SSL #gosetup

GOPATH looks strange. I bet it should be `C:\Go;C:\Users\rbessnow\go`, check this in Settings | Go | GOPATH.

> C:\Program Files\JetBrains\GoLand 2018.2\bin\runnerw.exe" C:\Go\bin\go.exe test -json ./... 

Try to invoke in the terminal in your project's directory.

0
Comment actions Permalink

If I do what you recommend then I get “$GOPATH must not be set to $GOROOT” conflict, even though the GOROOT is set at C:\Go\bin. I do have a problem that GoPath at src\ProjectName and I would like the libraries to be in my local project. It works before fine. Here is another pointer that might help you to figure what is wrong with my setting. When I run the test with Coverage then it testing framework does not bark on me.

 

0
Comment actions Permalink

Alexander, the point I am trying to make is that Build an Test should be running against the same GoPath and if I installed the testing framework into whatever GoPath it was  is it should be able to run from there and all supporting libraries should be mapped belong a given GoPath. Am I missing something?

0
Comment actions Permalink

> If I do what you recommend then I get “$GOPATH must not be set to $GOROOT” conflict,

Then it should be just `C:\Users\rbessnow\go`. Why did you add `C:\Go\src` as a GOPATH in the first place?

0
Comment actions Permalink

> Alexander, the point I am trying to make is that Build an Test should be running against the same GoPath and if I installed the testing framework into whatever GoPath it was  is it should be able to run from there and all supporting libraries should be mapped belong a given GoPath. Am I missing something?

Sorry, I don't understand the question. I believe all your problems were introduced by the invalid GOPATH, which should be fixed.

0

Please sign in to leave a comment.