Skip to content

[cloud_functions] Integration test on iOS should turn build red on failure #1871

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/cloud_functions/cloud_functions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.1+9

* Ensure that integration test failures on iOS turn the build red.

## 0.4.1+8

* Fixes the `No implementation found for method CloudFunctions#call`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
firebase_core: ^0.4.0

dev_dependencies:
e2e: ^0.2.1
flutter_test:
sdk: flutter
flutter_driver:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,15 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:async';
import 'package:flutter_driver/driver_extension.dart';
import 'package:e2e/e2e.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:cloud_functions/cloud_functions.dart';

void main() {
final Completer<String> completer = Completer<String>();
enableFlutterDriverExtension(handler: (_) => completer.future);
tearDownAll(() => completer.complete(null));
E2EWidgetsFlutterBinding.ensureInitialized();

group('$CloudFunctions', () {
test('call', () async {
testWidgets('call', (_) async {
// default timeout
final HttpsCallable callable =
CloudFunctions.instance.getHttpsCallable(functionName: 'repeat');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

import 'dart:async';
import 'dart:io';

import 'package:flutter_driver/flutter_driver.dart';

Future<void> main() async {
final FlutterDriver driver = await FlutterDriver.connect();
await driver.requestData(null, timeout: const Duration(minutes: 1));
final String result =
await driver.requestData(null, timeout: const Duration(minutes: 1));
await driver.close();
exit(result == 'pass' ? 0 : 1);
}
3 changes: 2 additions & 1 deletion packages/cloud_functions/cloud_functions/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cloud_functions
description: Flutter plugin for Cloud Functions.
version: 0.4.1+8
version: 0.4.1+9
homepage: https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_functions/cloud_functions

flutter:
Expand All @@ -13,6 +13,7 @@ flutter:
pluginClass: CloudFunctionsPlugin

dependencies:
e2e: ^0.2.1
meta: ^1.1.6
flutter:
sdk: flutter
Expand Down