Skip to content

Conversation

@ctrl-f5
Copy link
Contributor

@ctrl-f5 ctrl-f5 commented Dec 15, 2020

Detect the suite from a test file or path relative to the current working directory.

This fixes the issue that the suite cant be detected when codeception.yml is in any subdirectory, and subsequently also fixes the issue when it's inside the tests directory, for which there was a single use case fix in place.

@ctrl-f5 ctrl-f5 force-pushed the match-single-test-path branch 3 times, most recently from b88d3a9 to 1040c00 Compare December 15, 2020 11:18
@samdark
Copy link
Member

samdark commented Dec 16, 2020

@Naktibalda worth merging master into this one and checking test results with GitHub actions.

@ctrl-f5 ctrl-f5 force-pushed the match-single-test-path branch from 1040c00 to a5dc57d Compare December 18, 2020 12:58
@ctrl-f5
Copy link
Contributor Author

ctrl-f5 commented Dec 18, 2020

@samdark updated with upstream, seems to run fine in the new actions setup!

@samdark
Copy link
Member

samdark commented Dec 18, 2020

It doesn't break current tests. That's good. It would be great to add some tests verifying the change.

@ctrl-f5
Copy link
Contributor Author

ctrl-f5 commented Dec 21, 2020

It was basically already tested by CodeceptionYmlInTestsDirCest since that's one use case. I've also added a more convoluted test case with some more directories to traverse, based on how we use it in our projects.

@ctrl-f5 ctrl-f5 force-pushed the match-single-test-path branch from f01b3d7 to e480660 Compare December 21, 2020 14:30
@Naktibalda Naktibalda merged commit 3579d06 into Codeception:4.1 Jan 23, 2021
@Naktibalda
Copy link
Member

@ctrl-f5 Your change broke codecept run tests - it is fails with this error:

In Run.php line 545:

  Test file can't be matched

#6103

Could you fix it?

@Naktibalda
Copy link
Member

I implemented patch, which will make your change to apply only if relative path is inside tests directory #6105

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

Successfully merging this pull request may close these issues.

3 participants