Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Oct 2, 2023
1 parent 481cd9f commit 5bf4570
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ void main() {
// Verify that no patch is available.
await expectLater(
isPatchAvailable(
appId: shorebirdYaml.appId,
releaseVersion: releaseVersion,
platform: platform,
arch: arch,
Expand Down Expand Up @@ -183,6 +184,7 @@ void main() {
// Verify that the patch is available.
await expectLater(
isPatchAvailable(
appId: shorebirdYaml.appId,
releaseVersion: releaseVersion,
platform: platform,
arch: arch,
Expand Down Expand Up @@ -241,6 +243,7 @@ void main() {
// Verify that no patch is available.
await expectLater(
isPatchAvailable(
appId: shorebirdYaml.appId,
releaseVersion: releaseVersion,
platform: platform,
arch: arch,
Expand All @@ -254,13 +257,23 @@ void main() {
}

Future<bool> isPatchAvailable({
required String appId,
required String releaseVersion,
required String platform,
required String arch,
required String channel,
}) async {
final response = await http.get(
final response = await http.post(
Uri.parse(Platform.environment['SHOREBIRD_HOSTED_URL']!),
body: jsonEncode(
{
'release_version': releaseVersion,
'platform': platform,
'arch': arch,
'app_id': appId,
'channel': channel,
},
),
);
if (response.statusCode != HttpStatus.ok) {
throw Exception('Patch Check Failure: ${response.statusCode}');
Expand Down

0 comments on commit 5bf4570

Please sign in to comment.