revup icon indicating copy to clipboard operation
revup copied to clipboard

revup test suite

Open jerry-skydio opened this issue 3 years ago • 2 comments

We desperately need a comprehensive test suite before we can start taking more contributions

jerry-skydio avatar Aug 18 '22 03:08 jerry-skydio

More thoughts

Test helper classes:

GitEnvironment - a test helper that initializes a temporary git repository and sets up a basic commit history and file structure. Includes simple methods for making and checking the contents of files, commits, and cache.

FakeGithub - inspired by https://github.com/ezyang/ghstack/blob/master/ghstack/github_fake.py. A fake github server object that can parse and return results for graphql queries. Also contains a push target that intercepts git pushes and redirects them to a git repo inside the fake server.

jerry-skydio avatar Sep 15 '22 05:09 jerry-skydio

Github fake looks pretty cool. I don't do a lot of web dev so maybe this is not actually an issue... I have some concerns about the stability of the API and having to maintain a mock of it? I definitely think it's worth using but it'd be interesting if github already provides a mock interface to their web API :thinking: That'd be pretty sweet :slightly_smiling_face:

Doesn't seem to be the case. I guess we want more than valid API requests (might be worth having a test for this as well to track api deprecation). We want to mock the behavior of creating real pull requests and whatnot. A github mock does seem to be the most reasonable way of doing this.

gbalke avatar Sep 15 '22 06:09 gbalke