diff --git a/.github/tour.sh b/.github/tour.sh index 73bb7d5f..f8d6fafd 100755 --- a/.github/tour.sh +++ b/.github/tour.sh @@ -38,7 +38,7 @@ echo Build clitester cmake --build tester_build --config Release echo Start test server -( timeout 999 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 | tee server.log & ) & +( (timeout 1999 python3 ./ipfs_chromium/test_data/test_server.py 8080 2>&1 ; echo -e '\n LOCALHOST SERVER EXITING FROM TIMEOUT \n ') | tee server.log & ) & for t in 1{0..9} do if grep -n . server.log @@ -59,15 +59,15 @@ function url_case() { echo "test case description =${4}" ll="${5-note}" echo "log level = ${ll}" - set +x - timeout 440 ./tester_build/clitester "${ll}" "${1}://${2}" + set +e + timeout 441 ./tester_build/clitester "${ll}" "${1}://${2}" ec=$? - set -x + set -e if [ ${ec} -eq 0 ] then echo clitester exited with successful status else - echo "Directly reported error code ${ec} from clitester run - usually means timeout killed it. " "${@}" + echo "Directly reported error code ${ec} from clitester run - usually means timeout killed it. " "${@}" exit 6 fi n="$(sed 's,[^A-Za-z0-9\.],_,g' <<< ${2})" @@ -100,13 +100,13 @@ function url_case() { } unstable_case() { - set +x - timeout 401 ./tester_build/clitester "ipns://${1}" - ec=$? - set -x - if [ ${ec} -ne 0 ] + set +e + timeout 402 ./tester_build/clitester "ipns://${1}" + ec=$? + set -e + if [ ${ec} -ne 0 ] then - echo "clitester (or timeout) failed with exit code ${ec} for ipns://${1}" + echo "clitester (or timeout) failed with exit code ${ec} for ipns://${1}" exit 5 fi n=`sed 's,[^A-Za-z0-9\.],_,g' <<< ${1}` diff --git a/library/src/ipfs_client/ctx/transitory_gateway_config.cc b/library/src/ipfs_client/ctx/transitory_gateway_config.cc index e34fe6d2..93adc105 100644 --- a/library/src/ipfs_client/ctx/transitory_gateway_config.cc +++ b/library/src/ipfs_client/ctx/transitory_gateway_config.cc @@ -55,7 +55,7 @@ unsigned Self::RoutingApiDiscoveryDefaultRate() const { return 60U; } bool Self::RoutingApiDiscoveryOfUnencryptedGateways() const { - return false; + return true; } int Self::GetTypeAffinity(std::string_view, gw::GatewayRequestType) const { return 9; diff --git a/test_data/cars/bafybeifx4tcpzbw7tzhwfbzsofgoana6cy7xbt64e3u6itve44c5zelpmm b/test_data/cars/bafybeifx4tcpzbw7tzhwfbzsofgoana6cy7xbt64e3u6itve44c5zelpmm new file mode 100644 index 00000000..f3deb614 Binary files /dev/null and b/test_data/cars/bafybeifx4tcpzbw7tzhwfbzsofgoana6cy7xbt64e3u6itve44c5zelpmm differ diff --git a/test_data/test_server.py b/test_data/test_server.py index 672ab3f7..32230a80 100755 --- a/test_data/test_server.py +++ b/test_data/test_server.py @@ -23,19 +23,20 @@ def do_GET(self): match components[1]: case 'ipfs': if len(components) == 3: - path = join(here, 'blocks') + path = join(here, 'blocks', components[2]) else: - path = join(here, 'cars') + path = join(here, 'cars', components[2]) case 'ipns': path = join(here, 'names') + for comp in components[2:]: + if len(path) > 0: + path = join(path, comp.split('?')[0]) case 'routing': self.respond(join(here, 'gotit.json')) return case _ : print(f"{self.path} ({components}) not handled request type ({components[0]})", file=sys.stderr) exit(9) - for comp in components[2:]: - path = join(path, comp) self.respond(path) def respond(self, path):