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

Master is broken with matchers and white box tests #77

Closed
jpopadak opened this issue Feb 13, 2019 · 5 comments
Closed

Master is broken with matchers and white box tests #77

jpopadak opened this issue Feb 13, 2019 · 5 comments

Comments

@jpopadak
Copy link
Contributor

@petergtz Turns out this issue of master for the tooling vs v2.0.2 for the library is occurring again with your latest master changes (similar issue to #74 ):

pegomock: error: Could not determine package name.: Error while determining Go package name from Go file in /Users/james.popadak/go/src/github.com/<team>/<repo>/internal/app/module/resourcegrouptype/createresourcegrouptype: 
[/Users/james.popadak/go/src/github.com/<team>/<repo>/internal/app/module/resourcegrouptype/createresourcegrouptype/endpoint_test.go:16:2: could not import 
github.com/<team>/<repo>/internal/app/module/resourcegrouptype/createresourcegrouptype/matchers (cannot find package 
"github.com/<team>/<repo>/internal/app/module/resourcegrouptype/createresourcegrouptype/matchers" in any of:
<path>

We have two things occurring, but dont know if they are related.

(1) Turns out that if you delete the matchers and attempt to re-generate, it fails to find the matchers (which makes sense because they
were deleted and havent been generated).
And the most immediate issue for us
(2) If you have a file named pagehelper but you are attempting to do a White Box test using the actual package name instead of package <packagename>_test, your parser fails.

/Users/james.popadak/go/src/github.com/<team>/<repo>/internal/app/module/resourcegrouptype/listresourcegrouptype/pagehelper_wb_test.go:1:1: package listresourcegrouptype; expected listresourcegrouptype_test
@petergtz
Copy link
Owner

Hi @jpopadak, this shouldn't be an issue with tooling versus latest release. I made sure these are in sync now. It looks like the package determination is using wrong assumptions from what I can see from your snippets.

Wondering: is this blocking you completely or can you somehow pin your stuff to the previous version. Depending on your answer I can either roll back part of the change (only deal correctly with dashes) or I could take more time, maybe a couple of days, to figure out what's actually wrong and fix it.

@petergtz
Copy link
Owner

Actually, I can see now what is wrong. I need to change the tests to take into account more complex dependency setups. Let me roll back that part of the code and release it as v2.0.3.

Sorry about this.

petergtz added a commit that referenced this issue Feb 13, 2019
This is not covering certain use cases and needs more testing before it can be made available.

See also: #77
@petergtz
Copy link
Owner

@jpopadak You should be good to go with v2.0.3. Will be offline for a while. Please post back if there are still open issues.

@petergtz
Copy link
Owner

@jpopadak closing this assuming the issue is resolved for you. Please re-open if not.

@jpopadak
Copy link
Contributor Author

Sorry for the late response, been a busy week. The rollback worked and things are working again.

It was a blocker for our development team as no tests on our CI server were passing due to tooling being new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants