ci(flatpak): sync with flathub (#3259)

This commit is contained in:
ReenigneArcher 2024-10-04 21:47:04 -04:00 committed by GitHub
commit 0107ca44d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
24 changed files with 415 additions and 102 deletions

View file

@ -45,9 +45,18 @@ TEST_P(DownloadFileTest, Run) {
ASSERT_TRUE(http::download_file(url, path));
}
#ifdef SUNSHINE_BUILD_FLATPAK
// requires running `npm run serve` prior to running the tests
constexpr const char *URL_1 = "http://0.0.0.0:3000/hello.txt";
constexpr const char *URL_2 = "http://0.0.0.0:3000/hello-redirect.txt";
#else
constexpr const char *URL_1 = "https://httpbin.org/base64/aGVsbG8h";
constexpr const char *URL_2 = "https://httpbin.org/redirect-to?url=/base64/aGVsbG8h";
#endif
INSTANTIATE_TEST_SUITE_P(
DownloadFileTests,
DownloadFileTest,
testing::Values(
std::make_tuple("https://httpbin.org/base64/aGVsbG8h", "hello.txt"),
std::make_tuple("https://httpbin.org/redirect-to?url=/base64/aGVsbG8h", "hello-redirect.txt")));
std::make_tuple(URL_1, "hello.txt"),
std::make_tuple(URL_2, "hello-redirect.txt")));