Skip to content

Commit

Permalink
[wrong] test ci
Browse files Browse the repository at this point in the history
  • Loading branch information
grqz authored Sep 15, 2024
1 parent 9b94c4a commit 44a6a18
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
printf "%s\n" "$script_response"
echo "::endgroup::"
if [[ "$script_response" != *"BgUtilScriptPot: Generating POT via script: "* ]]; then
echo "::error title=BgUtilScriptPot was not invoked,file=plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py::" \
"BgUtilScriptPot was not invoked"
echo "::error title=BgUtilScriptPot was not invoked,file=plugin/yt_dlp_plugins/extractor/getpot_bgutil_script.py::\
BgUtilScriptPot was not invoked"
exit 1
fi
- name: Test server method
Expand All @@ -77,17 +77,17 @@ jobs:
}
export -f ping
timeout 7.5 bash -c "ping 0.5" || \
echo "::error title=Timeout reached,file=server/src/main.ts::" \
"Timeout reached before the server is up."
echo "::error title=Timeout reached,file=server/src/main.ts::\
Timeout reached before the server is up."
echo "::group::Response from HTTP server"
echo $RESP | jq
echo "::endgroup::"
cd ..
script_response=$(./yt-dlp -vF --print-traffic BaW_jenozKc 2>&1) || \
echo "::error title=Failed to run yt-dlp when testing HTTP server::" \
"yt-dlp returned $? exit status"
echo "::error title=Failed to run yt-dlp when testing HTTP server::\
yt-dlp returned $? exit status"
kill $NODE_PID
Expand All @@ -101,7 +101,7 @@ jobs:
echo "::endgroup::"
if [[ "$script_response" != *"BgUtilHTTPPot: Generating POT via HTTP server"* ]]; then
echo "::error title=BgUtilHTTPPot was not invoked,file=plugin/yt_dlp_plugins/extractor/getpot_bgutil_http.py::" \
"BgUtilHTTPPot was not invoked"
echo "::error title=BgUtilHTTPPot was not invoked,file=plugin/yt_dlp_plugins/extractor/getpot_bgutil_http.py::\
BgUtilHTTPPot was not invoked"
exit 1
fi
1 change: 1 addition & 0 deletions plugin/yt_dlp_plugins/extractor/getpot_bgutil_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def _validate_get_pot(self, client: str, ydl: YoutubeDL, visitor_data=None, data
f'Please ensure they are on the same version. '
f'(plugin: {self.VERSION}, server: {response.get("version", "unknown")})',
once=True)
raise UnsupportedRequest
self.base_url = base_url

def _get_pot(self, client: str, ydl: YoutubeDL, visitor_data=None, data_sync_id=None, player_url=None, **kwargs) -> str:
Expand Down

0 comments on commit 44a6a18

Please sign in to comment.