svn-all-fast-export/svn2git

Test name collision

Closed this issue · 1 comments

I ran into this warning in CI logs:

bats warning: duplicate test name(s) in /home/runner/work/svn2git/svn2git/test/empty-dirs.bats: test_branching_with_svn-2dignore-2c_svn-2dbranches_and_empty-2ddirs_parameter_should_not_replace_filled_-2egitignore_files_with_empty_ones

I can confirm that we have two tests named branching with svn-ignore, svn-branches and empty-dirs parameter should not replace filled .gitignore files with empty ones:

# git --no-pager grep -n 'should not replace'
test/empty-dirs.bats:1031:@test 'branching with svn-ignore, svn-branches and empty-dirs parameter should not replace filled .gitignore files with empty ones' {
test/empty-dirs.bats:1063:@test 'branching with svn-ignore, svn-branches and empty-dirs parameter should not replace filled .gitignore files with empty ones' {

Both tests were added in fcb62af.

CC @Vampire

Gosh.
Thx.
Unfortunately they only warn, while this is rather critical, as it means one test is not run and the other is run twice.
I already reported this here: bats-core/bats-core#278
As I built a start script around the tests with some options anyway,
I now added a check that there is no duplicate test names warning in the output,
so now the build fails if this happens again as you can see at https://github.com/Vampire/svn2git/runs/601886557?check_suite_focus=true#step:6:90