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

testutils: fix export file when test name contains path separator #412

Merged
merged 1 commit into from
Sep 15, 2022

Conversation

willfindlay
Copy link
Contributor

Subtests in Go have a path separator ("/") in their name. This breaks our export file creation since it is considered an error by os.CreateTemp(). Replace the path separator with a "-" here to correct this.

Signed-off-by: William Findlay [email protected]

@willfindlay willfindlay requested a review from a team as a code owner September 15, 2022 17:18
@willfindlay willfindlay requested a review from sharlns September 15, 2022 17:18
@willfindlay willfindlay marked this pull request as draft September 15, 2022 17:42
@willfindlay
Copy link
Contributor Author

@kkourt I just realized I have to fix up some of the other funcs that expect a test name as well. Marking as draft till then.

Subtests in Go have a path separator ("/") in their name. This breaks our export file
creation since it is considered an error by os.CreateTemp(). Replace the path separator
with a "-" here to correct this.

Signed-off-by: William Findlay <[email protected]>
@willfindlay willfindlay force-pushed the pr/willfindlay/fix-export-file-path-separator branch from e1f6058 to 780968b Compare September 15, 2022 17:45
@willfindlay willfindlay marked this pull request as ready for review September 15, 2022 17:45
@willfindlay
Copy link
Contributor Author

There we go, should be fixed.

@willfindlay willfindlay merged commit f5ac275 into main Sep 15, 2022
@willfindlay willfindlay deleted the pr/willfindlay/fix-export-file-path-separator branch September 15, 2022 18:20
@kkourt
Copy link
Contributor

kkourt commented Sep 16, 2022

@kkourt I just realized I have to fix up some of the other funcs that expect a test name as well. Marking as draft till then.

Why was
image

needed? tName is a just a key in a map 🤔

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.

2 participants