JUnit extension that won't run your tests if request quota in GitHub is exceeded.
How to use. All you need is this (get the latest version here):
Maven:
<dependency>
<groupId>io.github.h1alexbel</groupId>
<artifactId>ghquota</artifactId>
<scope>test</scope>
</dependency>
Gradle:
dependencies {
testCompile 'io.github.h1alexbel:ghquota:<version>'
}
import java.net.URL;
import io.github.h1alexbel.ghquota.QuotaIsFine;
@Test
@ExtendWith(QuotaIsFine.class)
void readsContentInRealGitHub() {
new URL("api.github.com/repos/h1alexbel/ghquota").getContent();
}
We don't want this unit test to be executed when GitHub Quota API is exceeded. The Quota execution condition will prevent JUnit5 from executing the test when you are out of requests.
It's a Java project. You will need to install Maven 3.8.7+ Java 17+.
Fork repository, make changes, send us a pull request.
We will review your changes and apply them to the master
branch shortly,
provided they don't violate our quality standards. To avoid frustration,
before sending us your pull request please run full Maven build:
$ mvn clean install