File tree Expand file tree Collapse file tree
src/test/java/co/ipregistry/datasets Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33import co .ipregistry .datasets .model .GeolocationData ;
44import org .junit .jupiter .api .Assertions ;
5+ import org .junit .jupiter .api .Assumptions ;
56import org .junit .jupiter .api .Test ;
67
78import java .io .IOException ;
@@ -13,9 +14,12 @@ public class IpregistryGeolocationDatasetTest {
1314
1415 @ Test
1516 public void test () throws IOException {
17+ String secretKey = System .getenv ("IPREGISTRY_DATASETS_SECRET_KEY" );
18+ Assumptions .assumeTrue (secretKey != null && !secretKey .isEmpty (),
19+ "IPREGISTRY_DATASETS_SECRET_KEY environment variable not set" );
20+
1621 try (IpregistryGeolocationDataset dataset =
17- IpregistryGeolocationDataset .builder (
18- System .getenv ("IPREGISTRY_DATASETS_SECRET_KEY" )).build ()) {
22+ IpregistryGeolocationDataset .builder (secretKey ).build ()) {
1923
2024 Assertions .assertTrue (
2125 dataset .getBuildDate ().isAfter (
You can’t perform that action at this time.
0 commit comments