Skip to content

Commit 07fe1da

Browse files
committed
updated tests
1 parent 622cec8 commit 07fe1da

3 files changed

Lines changed: 7 additions & 11 deletions

File tree

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,15 @@ jobs:
1212
include:
1313
- stage: test
1414
script:
15-
- mvn clean test post-integration-test
16-
- stage: quality-report
17-
script:
18-
- mvn sonar:sonar -Dsonar.projectKey=yassine_ipdata-java-client
19-
- stage: package
15+
- mvn clean test post-integration-test sonar:sonar
16+
- stage: release
2017
script:
2118
- openssl enc -aes-256-cbc -d -in ./.travis/ipdata-java.crypted.gpg.key -out ./.travis/ipdata.out.key -base64 -K $GPG_AES_KEY -iv $GPG_AES_KEY_IV -S $GPG_AES_KEY_SALT
2219
- echo $GPG_PASSPHRASE | gpg --import --batch --yes --passphrase-fd 0 ./.travis/ipdata.out.key
2320
- mvn package verify -Prelease -DskipTests=true -Dgpg.keyname=$GPG_KEY_NAME -Dgpg.passphrase=$GPG_PASSPHRASE
2421
stages:
2522
- test
26-
- quality-report
27-
- name: package
23+
- name: release
2824
if: branch = releases
2925
notifications:
3026
email: false

pom.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ project {
2828
'version.build.jacoco' '0.8.4'
2929
'version.build.surefire' '3.0.0-M3'
3030
'sonar.organization' 'yassine-github'
31-
'sonar.coverage.jacoco.xmlReportPaths' 'target/site/code-coverage/jacoco.xml'
31+
'sonar.coverage.jacoco.xmlReportPaths' '${project.build.directory}/site/code-coverage/jacoco.xml'
3232
'sonar.links.homepage' 'https://github.com/yassine/ipdata-java-client'
3333
'sonar.links.issue' 'https://github.com/yassine/ipdata-java-client'
3434
'sonar.links.scm' 'https://github.com/yassine/ipdata-java-client'

src/test/java/io/ipdata/client/IpdataFunctionalTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,15 +110,15 @@ public void testCurrency() {
110110
@Test
111111
@SneakyThrows
112112
public void testFieldSelection() {
113-
IpdataModel ipdataModel = ipdataService.getFields("8.8.8.8", IpdataField.ASN, IpdataField.CURRENCY);
113+
IpdataModel ipdataModel = ipdataService.getFields("41.128.21.123", IpdataField.ASN, IpdataField.CURRENCY);
114114
String serialized = MAPPER.writeValueAsString(ipdataModel);
115-
String expected = TestUtils.get(HTTP_CLIENT, "/8.8.8.8", ImmutableMap.of("fields", "asn,currency"));
115+
String expected = TestUtils.get(HTTP_CLIENT, "/41.128.21.123", ImmutableMap.of("fields", "asn,currency"));
116116
expected = MAPPER.writeValueAsString(MAPPER.readValue(expected, IpdataModel.class));
117117
assertEquals(serialized, expected, false);
118118
Assert.assertNull(ipdataModel.threat());
119119
if (ipdataService == CACHING_IPDATA_SERVICE) {
120120
//value will be returned from cache now
121-
ipdataModel = ipdataService.getFields("8.8.8.8", IpdataField.ASN, IpdataField.CURRENCY);
121+
ipdataModel = ipdataService.getFields("41.128.21.123", IpdataField.ASN, IpdataField.CURRENCY, IpdataField.CARRIER);
122122
serialized = MAPPER.writeValueAsString(ipdataModel);
123123
assertEquals(serialized, expected, false);
124124
}

0 commit comments

Comments
 (0)