|
|
@ -6,15 +6,15 @@ import 'package:test/test.dart'; |
|
|
|
|
|
|
|
|
|
|
|
import 'helper.dart'; |
|
|
|
import 'helper.dart'; |
|
|
|
|
|
|
|
|
|
|
|
Future main() async { |
|
|
|
void main() { |
|
|
|
await run(await getDockerImage()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future run(final DockerImage image) async { |
|
|
|
|
|
|
|
group('news', () { |
|
|
|
group('news', () { |
|
|
|
|
|
|
|
late DockerImage image; |
|
|
|
late HttpServer rssServer; |
|
|
|
late HttpServer rssServer; |
|
|
|
setUpAll(() async => rssServer = await getRssServer()); |
|
|
|
setUpAll(() async { |
|
|
|
tearDownAll(() => rssServer.close(force: true)); |
|
|
|
image = await getDockerImage(); |
|
|
|
|
|
|
|
rssServer = await getRssServer(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
tearDownAll(() async => rssServer.close(force: true)); |
|
|
|
|
|
|
|
|
|
|
|
late DockerContainer container; |
|
|
|
late DockerContainer container; |
|
|
|
late TestNextcloudClient client; |
|
|
|
late TestNextcloudClient client; |
|
|
@ -24,12 +24,12 @@ Future run(final DockerImage image) async { |
|
|
|
}); |
|
|
|
}); |
|
|
|
tearDown(() => container.destroy()); |
|
|
|
tearDown(() => container.destroy()); |
|
|
|
|
|
|
|
|
|
|
|
Future<NewsListFeeds> addWikipediaFeed([final int? folderID]) => client.news.addFeed( |
|
|
|
Future<NewsListFeeds> addWikipediaFeed([final int? folderID]) async => client.news.addFeed( |
|
|
|
url: 'http://host.docker.internal:${rssServer.port}/wikipedia.xml', |
|
|
|
url: 'http://host.docker.internal:${rssServer.port}/wikipedia.xml', |
|
|
|
folderId: folderID, |
|
|
|
folderId: folderID, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
Future<NewsListFeeds> addNasaFeed() => client.news.addFeed( |
|
|
|
Future<NewsListFeeds> addNasaFeed() async => client.news.addFeed( |
|
|
|
url: 'http://host.docker.internal:${rssServer.port}/nasa.xml', |
|
|
|
url: 'http://host.docker.internal:${rssServer.port}/nasa.xml', |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|