Coder Social home page Coder Social logo

Comments (6)

vitaly-zdanevich avatar vitaly-zdanevich commented on June 16, 2024

Looks like I found the root cause: my file name was interfaces.go but vim-go was opening interface.go - renaming of the file looks like fix it, but better to open not an interface file but test file on concrete line...

from vim-go.

bhcleek avatar bhcleek commented on June 16, 2024

Vim-go gets the filename to put in the quickfix (and therefore the file to location to jump to) from the test failure. What's the output of go test in this case?

from vim-go.

vitaly-zdanevich avatar vitaly-zdanevich commented on June 16, 2024

With interfaces.go filename, I got this (cut related places):

        --- PASS: TestSuite_GraphService/TestProcessUpdateUsersRequest/OK:_If_CUSTOMER_ADMIN_user_is_present_both_in_Crave_and_Graph_but_the_store_is_not_enabled,_that_user_should_
NOT_be_deleted_from_Crave (0.00s)
        interface.go:74: Unexpected call to *client.MockClient.DeleteUser([context.TODO {1}]) at /home/vitaly/p/ri/svi/serv/service/crave/users.go:199 because: there are no expecte
d calls of the method "DeleteUser" for that receiver
github.com/golang/mock/gomock.(*Controller).Call.func1(0xc0001fc900, {0x89d480?, 0xc0001f2bb0}, {0x8d6214, 0xa}, {0xc0002204c0, 0x2, 0x2})
        /home/vitaly/go/pkg/mod/github.com/golang/[email protected]/gomock/controller.go:231 +0x334
github.com/golang/mock/gomock.(*Controller).Call(0xc0001fc900, {0x89d480, 0xc0001f2bb0}, {0x8d6214, 0xa}, {0xc0002204c0, 0x2, 0x2})
        /home/vitaly/go/pkg/mod/github.com/golang/[email protected]/gomock/controller.go:247 +0xad
github.com/River-Island/svi-services/pkg/crave/client/mocks.(*MockClient).DeleteUser(0xc0001f2bb0, {0x97d238?, 0xc000120018}, {0x8?})
        /home/vitaly/p/ri/svi/serv/pkg/crave/client/mocks/interface.go:74 +0xee
github.com/River-Island/svi-services/service/crave.(*ProcessorService).deleteRetiredUsers(0xc0001fc960, {0x97d238, 0xc000120018}, 0x8?, 0x8bc8a0?, {0xc00015c6c0, 0x2, 0x0?})
        /home/vitaly/p/ri/svi/serv/service/crave/users.go:199 +0x4a3

from vim-go.

bhcleek avatar bhcleek commented on June 16, 2024

That go test output indicates that the filename is interface.go and that the error is on line 74.

from vim-go.

vitaly-zdanevich avatar vitaly-zdanevich commented on June 16, 2024

Yes, interesting... Looks like we need to rename a few of our files - drop s at the end...

from vim-go.

bhcleek avatar bhcleek commented on June 16, 2024

I don't think you need to rename anything. I think the problem is in gomock, but I'm not quite sure what it is. The interface.go file that go test is referring to is /home/vitaly/p/ri/svi/serv/pkg/crave/client/mocks/interface.go. It's just a coincidence that you also have a file named interfaces.go.

from vim-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.