Skip to content

Commit 61d992d

Browse files
jmecomcodex
andcommitted
Bind hosted auth in PR5 push bootstrap restart test
Signed-off-by: jm <jm@squareup.com> Co-authored-by: Codex <noreply@openai.com>
1 parent 62a129e commit 61d992d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎mobile/test/shared/push/push_bootstrap_test.dart‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import 'package:buzz/shared/push/dev_push_lease.dart';
55
import 'package:buzz/shared/community/community.dart';
66
import 'package:buzz/shared/community/community_provider.dart';
77
import 'package:buzz/shared/community/community_storage.dart';
8+
import 'package:buzz/shared/hosted/builderlab_account.dart';
9+
import 'package:buzz/shared/hosted/hosted_relay_auth.dart';
810
import 'package:buzz/shared/push/push_bootstrap.dart';
911
import 'package:buzz/shared/push/push_bridge.dart';
1012
import 'package:buzz/shared/push/push_subscription.dart';
@@ -51,6 +53,8 @@ void main() {
5153
final journal = BuzzPushLeaseRevocationStorage(
5254
secure: FakeSecureStorage(),
5355
);
56+
final auth = HostedRelayAuth(BuilderlabAccountClient(), enabled: false);
57+
addTearDown(auth.dispose);
5458
var grant = 'opaque-before-revoke';
5559
var calls = 0;
5660
var nativeReads = 0;
@@ -96,12 +100,16 @@ void main() {
96100
});
97101
final overrides = [
98102
savedPrefsProvider.overrideWithValue(prefs),
103+
hostedRelayAuthProvider.overrideWithValue(auth),
99104
communityStorageProvider.overrideWithValue(storage),
100105
communitySnapshotWriterProvider.overrideWithValue((_) async {}),
101106
buzzPushLeaseRevocationOutboxProvider.overrideWith((ref) {
102107
final outbox = BuzzPushLeaseRevocationOutbox(
103108
storage: journal,
104-
publisher: publishBuzzPushLeaseRevocation,
109+
publisher: (record) => publishBuzzPushLeaseRevocation(
110+
record,
111+
relayAuth: ref.read(hostedRelayAuthProvider),
112+
),
105113
now: tester.binding.clock.now,
106114
jitter: () => 0,
107115
);

0 commit comments

Comments
 (0)