dspinellis/git-issue

Ways to implement automated testing for issue export

vyrondrosos opened this issue · 1 comments

Automated testing for exporting issues to GitHub/GitLab requires some consideration, since to test it we need to create and modify issues on an actual repository. The problem is of course, that this has security and abuse implications. I've thought of some ways to do that :

  • Public repository: Create a repository, make it available for everyone to create issues etc. Tests point to that repository, which is hardcoded in(Much like the tests for import).That can lead to eventual problems, since there currently is no way for GitHub issues to be deleted using the API(they can be closed, but not removed). This will lead to issues pilling up. Also the test results might depend on the current state of the repository.
  • Temporary repository : That would entail creating the repository during testing, and deleting it afterwards. A potential issue could be that the user has to either the repository himself, or provide a token with those privileges enabled.

I'd like to hear your opinions on this.

I agree with your view. You rightly indicate that the ideal is a temporary repository. I propose two things:

  1. Test import with a read-only frozen repo
  2. Test export if a token is provided. This is already supported in test.sh; search for GH_TOKEN.