-
Notifications
You must be signed in to change notification settings - Fork 609
Conversation
This will be very helpful. Currently, it is more of a trial and error to find this info. |
c7b7034
to
946653f
Compare
fce40a6
to
03613f8
Compare
Bump |
ping |
It'd be great to get this merged into the main repo. I've been using the fork and it's helped immensely. |
Anything I can do to help this get merged? |
@balshetzer and I discussed this offline. We think it might be best to have this more as an opt-in. We are proposing (#238) a way to add options to the controller. I think this PR would be a good fit as an option. |
so the user can see exactly why the function is being called. E.g.: ``` ------------------------------ • Failure [0.002 seconds] Handlers /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications/handlers_test.go:46 List /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications/handlers_test.go:85 works [It] /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications/handlers_test.go:86 Unexpected call to *mock_db.MockWrapper.Select([0xc4201908a0 SELECT * FROM ApplicationDefinition]) at /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/mocks/shared/db/wrapper.go:82 because: there are no expected calls of the method "Select" for that receiver Stack: git.corp.adobe.com/adobe-platform/flight-director/mocks/shared/db.(*MockWrapper).Select /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/mocks/shared/db/wrapper.go:82 git.corp.adobe.com/adobe-platform/flight-director/shared/db.(*QueryFilter).SelectIntoEntities /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/shared/db/query_filter.go:74 git.corp.adobe.com/adobe-platform/flight-director/shared/models.GetApplicationDefinitionList /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/shared/models/application.go:153 git.corp.adobe.com/adobe-platform/flight-director/shared/models.GetAllApplicationDefinition /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/shared/models/application.go:166 git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications.(*Dispatcher).List /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications/handlers.go:228 git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications.(*Dispatcher).List-fm /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications/dispatcher.go:26 net/http.HandlerFunc.ServeHTTP /usr/local/Cellar/go/1.10/libexec/src/net/http/server.go:1947 git.corp.adobe.com/adobe-platform/flight-director/vendor/github.com/gorilla/mux.(*Router).ServeHTTP /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/vendor/github.com/gorilla/mux/mux.go:159 git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications.glob..func2.3.1 /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/server/routes/applications/handlers_test.go:89 /Users/abramowi/go/src/git.corp.adobe.com/adobe-platform/flight-director/mocks/shared/db/wrapper.go:82 ------------------------------ ```
with `github.com/pkg/errors` for its stack trace functionality
03613f8
to
8623138
Compare
I rebased and fixed merge conflicts. I'll have to look at the options you added to see how I can incorporate it into my code. Any quick tips? |
Hey sorry for the radio silence on this! If you're still interested, I would love to discuss it further with you. A few things:
|
@msabramo Thoughts? |
I am going to close this for now due to lack of inactivity. Please reopen if you are still interested in working on this. Thanks. |
Print stack for
Unexpected call
errorsso the user who is running the tests can see exactly where/why the function is being called. E.g.:
This has a dependency on github.com/pkg/errors, which I simply vendored in to make things simple and easy for users of github.com/golang/mock.
Cc: @seanisom, @mayanand, @balshetzer