In retrospect, it would have been much better to link to an external repo or site or source for the test file, rather than to have that as part of the GitHub repo.
ETA: you’re right that they were always going to go after something, but the action for GitHub to take down the repo wouldn’t be arguable if the test file wasn’t in the repo. It’s possible they would have gone to issues/comments within the project (another reason, in retrospect, to host that stuff separately), but in this case there was stuff in the source code that the RIAA can reasonably argue would lead to infringement.