File tree Expand file tree Collapse file tree
src/test/java/com/testingbot/testingbotrest Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66import java .util .*;
77
88import org .junit .Assert ;
9+ import org .junit .Assume ;
910import org .junit .Before ;
1011import org .junit .Test ;
1112import static org .hamcrest .CoreMatchers .is ;
@@ -21,7 +22,14 @@ public class TestingBotRestTest {
2122
2223 @ Before
2324 public void setUp () {
24- this .api = new TestingbotREST (System .getenv ("TB_KEY" ), System .getenv ("TB_SECRET" ));
25+ String key = System .getenv ("TB_KEY" );
26+ String secret = System .getenv ("TB_SECRET" );
27+ // Live integration suite: skip (not fail) when credentials are absent,
28+ // e.g. on Dependabot or outside-contributor PRs that lack Actions secrets.
29+ // The mock suite still runs; this suite runs on master pushes / releases.
30+ Assume .assumeTrue ("TB_KEY/TB_SECRET not set; skipping live API tests" ,
31+ key != null && !key .isEmpty () && secret != null && !secret .isEmpty ());
32+ this .api = new TestingbotREST (key , secret );
2533 }
2634
2735 @ Test
You can’t perform that action at this time.
0 commit comments