-
Notifications
You must be signed in to change notification settings - Fork 155
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
feat(fluxtest): enhance fluxtest to use package name with test/skip flags #5039
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had some comments but this looks good for the most part. I had a couple of comments that it would be good to address.
Let's make sure that downstream repos, which have their own skip lists, continue to work right.
23a5cf8
to
9be3e2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are definitely close on this, but it would be good to have test case for the error that is produced when two cases have the same name in the same package. That will keep us from having any ambiguity moving forward, to it would be good to lock it down.
At the moment we print only the start and end location of the ast. with this change filename will be included in the location print. requred in #5039 to print duplicate existing test with filename in the location.
…5057) * fix: pass filename to the flux parser to get it printed in location At the moment we print only the start and end location of the ast. with this change filename will be included in the location print. requred in #5039 to print duplicate existing test with filename in the location. * chore: make generate
After merging #5057 Did a manual test by duplicating the test case name in the same package and got the below error -
|
9be3e2f
to
abbbfe5
Compare
|
||
func Test_TestCmd_Error_Duplicate(t *testing.T) { | ||
wantErr := errors.New("duplicate testcase name \"duplicate\", found in package \"test\", at locations testdataduplicate/test_test.flux|7:10-7:19 and testdataduplicate/test_test.flux|14:10-14:19") | ||
runForPath(t, "./testdataduplicate", wantErr, "--test", "duplicate") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!
3577d8e
to
21b863f
Compare
…ip flags Conflicting test names produce an error Existing conflict are fixed fixes: #4877
21b863f
to
1dc4589
Compare
The package name can be added to the testcase name as a qualifier
Format -
package.name
Here is an example -
There are 2 testcase exist with name group
// testcase name without qualifier will run both the test.
// testcase name with qualifier will run the specific test
Adding a duplicate test name in the same package will produce an error -
testcase name "group", already exists in package "universe"
fixes: #4877
Checklist
Dear Author 👋, the following checks should be completed (or explicitly dismissed) before merging.
experimental/
docs/Spec.md
has been updatedDear Reviewer(s) 👋, you are responsible (among others) for ensuring the completeness and quality of the above before approval.