Skip to content

Commit

Permalink
feat: change the absolute path by relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelAHM committed Nov 15, 2024
1 parent 1f1c525 commit c8a804f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion whois-commons/src/main/resources/nrtm_client_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

DROP TABLE IF EXISTS `version`;
DROP TABLE IF EXISTS `public_key`;
DROP TABLE IF EXISTS `last_mirror`;
DROP TABLE IF EXISTS `version_info`;

CREATE TABLE `version`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public UpdateNotificationFileResponse getNotificationFile(final String source){
@Nullable
public byte[] getSnapshotFile(final String url){
try {
final Response response = client.target(url)
final Response response = client.target(String.format("%s/%s", baseUrl, url))
.request(MediaType.APPLICATION_OCTET_STREAM)
.header(HttpHeader.X_FORWARDED_PROTO.asString(), HttpScheme.HTTPS.asString())
.get(Response.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public class NrtmServerDummy implements Stub {
"version": 1,
"snapshot": {
"version": 1,
"url": "http://localhost:%s/nrtmv4/RIPE/nrtm-snapshot.4.RIPE.4521174b-548f-4e51-98fc-dfd720011a0c.82542bd048e111fe57db404d08b6433e.json.gz",
"url": "RIPE/nrtm-snapshot.4.RIPE.4521174b-548f-4e51-98fc-dfd720011a0c.82542bd048e111fe57db404d08b6433e.json.gz",
"hash": "%s"
},
"deltas": [
{
"version": 1,
"url": "http://localhost:%s/nrtmv4/RIPE/nrtm-delta.4.RIPE.4521174b-548f-4e51-98fc-dfd720011a0c.e3be41ff312010046b67d099faa58f44.json",
"url": "RIPE/nrtm-delta.4.RIPE.4521174b-548f-4e51-98fc-dfd720011a0c.e3be41ff312010046b67d099faa58f44.json",
"hash": "c50dd7554cb35ef5f2f45d7bfa09fc51033cbe1152d29b36cb1178319e22be3e"
}
]
Expand All @@ -80,7 +80,7 @@ public class NrtmServerDummy implements Stub {
"version": 1,
"snapshot": {
"version": 1,
"url": "http://localhost:%s/nrtmv4/RIPE-NONAUTH/nrtm-snapshot.1.RIPE-NONAUTH.6328095e-7d46-415b-9333-8f2ae274b7c8.f1195bb8a666fe7b97fa74009a70cefa.json.gz",
"url": "RIPE-NONAUTH/nrtm-snapshot.1.RIPE-NONAUTH.6328095e-7d46-415b-9333-8f2ae274b7c8.f1195bb8a666fe7b97fa74009a70cefa.json.gz",
"hash": "%s"
},
"deltas": []
Expand Down Expand Up @@ -263,18 +263,18 @@ public Object response() {
}

private String getFakeUpdateNotificationRipeResponse(){
return String.format(unfRipeTemplate, port, "fake_hash", port);
return String.format(unfRipeTemplate, "fake_hash");
}

private String getFakeUpdateNotificationNonAuthResponse(){
return String.format(unfRipeNonAuthTemplate, port, "fake_hash");
return String.format(unfRipeNonAuthTemplate, "fake_hash");
}

private String getUpdateNotificationFileRipeResponse(){
return String.format(unfRipeTemplate, port, "b8fe5f2ae046e37a34c0228c237e824ac4c53d973beb81495b0e9526b4607c19", port);
return String.format(unfRipeTemplate, "b8fe5f2ae046e37a34c0228c237e824ac4c53d973beb81495b0e9526b4607c19");
}

private String getUpdateNotificationFileNonAuthResponse(){
return String.format(unfRipeNonAuthTemplate, port, "148c3c411b8f044f5fc0ab201f6dd03e80c862e27ad1a63488aee337dc7eb4a2");
return String.format(unfRipeNonAuthTemplate, "148c3c411b8f044f5fc0ab201f6dd03e80c862e27ad1a63488aee337dc7eb4a2");
}
}

0 comments on commit c8a804f

Please sign in to comment.