Skip to content

Commit c4d5612

Browse files
committed
fix renames
1 parent 091a192 commit c4d5612

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

app/test/admin/exported_api_sync_test.dart

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import '../shared/test_services.dart';
1515
void main() {
1616
group('Exported API sync admin action', () {
1717
/// Invoke exported-api-sync action
18-
Future<void> exportedApiSync({
18+
Future<void> syncExportedApi({
1919
List<String>? packages,
2020
bool forceWrite = false,
2121
}) async {
@@ -65,8 +65,8 @@ void main() {
6565
}
6666

6767
testWithProfile('baseline checks', fn: () async {
68-
await _sync();
69-
final data = await _list();
68+
await syncExportedApi();
69+
final data = await listExportedApi();
7070
expect(data.keys, hasLength(greaterThan(20)));
7171
expect(data.keys, hasLength(lessThan(40)));
7272

@@ -100,8 +100,8 @@ void main() {
100100
});
101101

102102
testWithProfile('deleted files + full sync', fn: () async {
103-
await _sync();
104-
final oldRoot = await _list();
103+
await syncExportedApi();
104+
final oldRoot = await listExportedApi();
105105

106106
for (final e in oldRoot.entries) {
107107
final path = e.key;
@@ -111,8 +111,8 @@ void main() {
111111
storageService.bucket(activeConfiguration.exportedApiBucketName!);
112112
await bucket.delete(path);
113113

114-
await _sync();
115-
final newRoot = await _list();
114+
await syncExportedApi();
115+
final newRoot = await listExportedApi();
116116
expect(newRoot.containsKey(path), true);
117117
final newData = newRoot[path] as Map;
118118
expect(oldData['bytes'], isNotEmpty);
@@ -121,8 +121,8 @@ void main() {
121121
});
122122

123123
testWithProfile('delete files + selective sync', fn: () async {
124-
await _sync();
125-
final oldRoot = await _list();
124+
await syncExportedApi();
125+
final oldRoot = await listExportedApi();
126126

127127
final oxygenFiles =
128128
oldRoot.keys.where((k) => k.contains('oxygen')).toList();
@@ -133,17 +133,17 @@ void main() {
133133
storageService.bucket(activeConfiguration.exportedApiBucketName!);
134134
await bucket.delete(path);
135135

136-
await _sync(packages: ['neon']);
136+
await syncExportedApi(packages: ['neon']);
137137
expect(await bucket.tryInfo(path), isNull);
138138

139-
await _sync(packages: ['oxygen']);
139+
await syncExportedApi(packages: ['oxygen']);
140140
expect(await bucket.tryInfo(path), isNotNull);
141141
}
142142
});
143143

144144
testWithProfile('modified files + selective sync', fn: () async {
145-
await _sync();
146-
final oldRoot = await _list();
145+
await syncExportedApi();
146+
final oldRoot = await listExportedApi();
147147

148148
final oxygenFiles =
149149
oldRoot.keys.where((k) => k.contains('oxygen')).toList();
@@ -155,23 +155,23 @@ void main() {
155155
storageService.bucket(activeConfiguration.exportedApiBucketName!);
156156
await bucket.writeBytes(path, [1]);
157157

158-
await _sync(packages: ['neon']);
158+
await syncExportedApi(packages: ['neon']);
159159
expect((await bucket.info(path)).length, 1);
160160

161-
await _sync(packages: ['oxygen']);
161+
await syncExportedApi(packages: ['oxygen']);
162162
expect((await bucket.info(path)).length, greaterThan(1));
163163

164164
// also check file content
165-
final newRoot = await _list();
165+
final newRoot = await listExportedApi();
166166
final newData = newRoot[path] as Map;
167167
expect(newData['length'], greaterThan(1));
168168
expect(oldData['bytes'], newData['bytes']);
169169
}
170170
});
171171

172172
testWithProfile('modified metadata + selective sync', fn: () async {
173-
await _sync();
174-
final oldRoot = await _list();
173+
await syncExportedApi();
174+
final oldRoot = await listExportedApi();
175175

176176
final oxygenFiles =
177177
oldRoot.keys.where((k) => k.contains('oxygen')).toList();
@@ -189,17 +189,17 @@ void main() {
189189
),
190190
);
191191

192-
await _sync(packages: ['neon']);
192+
await syncExportedApi(packages: ['neon']);
193193
expect((await bucket.info(path)).metadata.custom, {'x': 'x'});
194194

195-
await _sync(packages: ['oxygen']);
195+
await syncExportedApi(packages: ['oxygen']);
196196
final newInfo = await bucket.info(path);
197197
expect(
198198
newInfo.metadata.contentType, oldData['metadata']['contentType']);
199199
expect(newInfo.metadata.custom, {'validated': isNotEmpty});
200200

201201
// also check file content
202-
final newRoot = await _list();
202+
final newRoot = await listExportedApi();
203203
final newData = newRoot[path] as Map;
204204
expect(newData['length'], greaterThan(1));
205205
expect(oldData['bytes'], newData['bytes']);

0 commit comments

Comments
 (0)