Skip to content

Commit 5ef9b22

Browse files
authored
Master gh 580 b dbip download workflow (#648)
* added dbip_download github workflow * change to run every day on midnight for QA * necesary changes to be able build dbip_country.rs on master * -p for generating ip_country/src * todo in dbip_download.yaml * condition for new branch generated-source * fixing condition for generated-source branch * fix generated-source branch name in condition * increse standard timeout milis const * manual trigger and debugging flags to runs * use variable to store git ls-remote command * add git fetch before checkout * fix workflow for nonexistent branch * fixing edgecases on nonexistent branch and no git changes * change neverssl to different web
1 parent 823f818 commit 5ef9b22

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.github/workflows/dbip_download.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
git config user.name "github-actions[bot]"
5050
git config user.email "github-actions[bot]@users.noreply.github.com"
5151
git fetch
52-
BRANCH=$(git ls-remote --heads 2>/dev/null | grep generated-source)
52+
BRANCH="$(git ls-remote --exit-code --heads origin generated-source 2>/dev/null || true)"
5353
if [[ "$BRANCH" == "" ]]
5454
then
5555
git checkout -B generated-source
@@ -58,7 +58,11 @@ jobs:
5858
else
5959
git checkout generated-source
6060
fi
61-
mv "${TEMP_DIR}"/dbip_country.rs ip_country/src/dbip_country.rs
62-
git add ip_country/src/dbip_country.rs
63-
git commit -m "Update generated dbip_country ${YEAR_MONTH} Rust source file"
64-
git push -u origin HEAD
61+
DIFF="$(diff "${TEMP_DIR}"/dbip_country.rs ip_country/src/dbip_country.rs || true)"
62+
if [[ "$DIFF" != "" ]]
63+
then
64+
mv "${TEMP_DIR}"/dbip_country.rs ip_country/src/dbip_country.rs
65+
git add ip_country/src/dbip_country.rs
66+
git commit -m "Update generated dbip_country ${YEAR_MONTH} Rust source file" || true
67+
git push -u origin HEAD
68+
fi

multinode_integration_tests/tests/data_routing_test.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn multiple_stream_zero_hop_test() {
316316
let mut another_client = zero_hop_node.make_client(8080, STANDARD_CLIENT_TIMEOUT_MILLIS);
317317

318318
one_client.send_chunk(b"GET / HTTP/1.1\r\nHost: www.example.com\r\n\r\n");
319-
another_client.send_chunk(b"GET /online/ HTTP/1.1\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\r\nAccept-Language: cs-CZ,cs;q=0.9,en;q=0.8,sk;q=0.7\r\nCache-Control: max-age=0\r\nConnection: keep-alive\r\nHost: whatever.neverssl.com\r\nUpgrade-Insecure-Requests: 1\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36\r\n\r\n");
319+
another_client.send_chunk(b"GET / HTTP/1.1\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\r\nAccept-Language: cs-CZ,cs;q=0.9,en;q=0.8,sk;q=0.7\r\nCache-Control: max-age=0\r\nConnection: keep-alive\r\nHost: www.testingmcafeesites.com\r\nUpgrade-Insecure-Requests: 1\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36\r\n\r\n");
320320

321321
let one_response = one_client.wait_for_chunk();
322322
let another_response = another_client.wait_for_chunk();
@@ -330,7 +330,8 @@ fn multiple_stream_zero_hop_test() {
330330
assert_eq!(
331331
index_of(
332332
&another_response,
333-
&b"neverssl.com will never use SSL (also known as TLS)"[..],
333+
&b"This is an index url which gives an overview of the different test urls available."
334+
[..],
334335
)
335336
.is_some(),
336337
true,

0 commit comments

Comments
 (0)