Skip to content

Commit d460aaa

Browse files
authored
Fix maven issues while downloading java dependencies (#171)
* Zip java-okhttp dependencies and unzip in ci-requirements * zip java-unirest dependencies and update ci-requirements. * Change httpbin to mockbin for redirect test.
1 parent ad1587a commit d460aaa

File tree

4 files changed

+10
-16
lines changed

4 files changed

+10
-16
lines changed
Binary file not shown.
Binary file not shown.

npm/ci-requirements.sh

+2-11
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,12 @@ pushd ./codegens/java-okhttp &>/dev/null;
1414
sudo rm -rf /var/lib/apt/lists/*
1515
sudo apt-get update
1616
sudo apt-get install -y openjdk-8-jdk
17-
sudo wget http://central.maven.org/maven2/com/squareup/okhttp3/okhttp/3.9.1/okhttp-3.9.1.jar
18-
sudo wget http://central.maven.org/maven2/com/squareup/okio/okio/1.14.0/okio-1.14.0.jar
17+
unzip test/unit/fixtures/dependencies.zip
1918
popd &>/dev/null;
2019

2120
echo "Installing dependencies required for tests in codegens/java-unirest"
2221
pushd ./codegens/java-unirest &>/dev/null;
23-
sudo wget http://central.maven.org/maven2/com/mashape/unirest/unirest-java/1.4.9/unirest-java-1.4.9.jar
24-
sudo wget http://central.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.2/httpclient-4.5.2.jar
25-
sudo wget http://central.maven.org/maven2/commons-codec/commons-codec/1.9/commons-codec-1.9.jar
26-
sudo wget http://central.maven.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.jar
27-
sudo wget http://central.maven.org/maven2/org/apache/httpcomponents/httpcore/4.4.4/httpcore-4.4.4.jar
28-
sudo wget http://central.maven.org/maven2/org/apache/httpcomponents/httpasyncclient/4.1.1/httpasyncclient-4.1.1.jar
29-
sudo wget http://central.maven.org/maven2/org/apache/httpcomponents/httpcore-nio/4.4.4/httpcore-nio-4.4.4.jar
30-
sudo wget http://central.maven.org/maven2/org/json/json/20160212/json-20160212.jar
31-
sudo wget http://central.maven.org/maven2/org/apache/httpcomponents/httpmime/4.3.6/httpmime-4.3.6.jar
22+
unzip test/unit/fixtures/dependencies.zip
3223
popd &>/dev/null;
3324

3425
echo "Installing dependencies required for tests in codegens/csharp-restsharp"

test/codegen/newman/fixtures/redirectCollection.json

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "d5d65b0c-0f10-4455-8ba2-d887c4180a08",
3+
"_postman_id": "3ef1c00f-c58f-4604-8419-7a4931958235",
44
"name": "Redirect test",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
@@ -11,18 +11,21 @@
1111
"method": "GET",
1212
"header": [],
1313
"url": {
14-
"raw": "https://httpbin.org/redirect-to?url=https://postman-echo.com/get",
14+
"raw": "https://mockbin.org/redirect/302/1/?to=https://postman-echo.com/get",
1515
"protocol": "https",
1616
"host": [
17-
"httpbin",
17+
"mockbin",
1818
"org"
1919
],
2020
"path": [
21-
"redirect-to"
21+
"redirect",
22+
"302",
23+
"1",
24+
""
2225
],
2326
"query": [
2427
{
25-
"key": "url",
28+
"key": "to",
2629
"value": "https://postman-echo.com/get"
2730
}
2831
]

0 commit comments

Comments
 (0)