Browse Source

chore(nextcloud): Remove unnecessary proxy helper class

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/1185/head
jld3103 1 year ago
parent
commit
b131f5d172
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 2
      packages/nextcloud/test/core_test.dart
  2. 3
      packages/nextcloud/test/dashboard_test.dart
  3. 17
      packages/nextcloud/test/helper.dart
  4. 2
      packages/nextcloud/test/news_test.dart
  5. 2
      packages/nextcloud/test/notes_test.dart
  6. 5
      packages/nextcloud/test/notifications_test.dart
  7. 3
      packages/nextcloud/test/provisioning_api_test.dart
  8. 3
      packages/nextcloud/test/settings_test.dart
  9. 3
      packages/nextcloud/test/spreed_test.dart
  10. 3
      packages/nextcloud/test/uppush_test.dart
  11. 3
      packages/nextcloud/test/user_status_test.dart
  12. 2
      packages/nextcloud/test/webdav_test.dart

2
packages/nextcloud/test/core_test.dart

@ -9,7 +9,7 @@ void main() {
'core',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(container);

3
packages/nextcloud/test/dashboard_test.dart

@ -1,4 +1,5 @@
import 'package:nextcloud/dashboard.dart';
import 'package:nextcloud/nextcloud.dart';
import 'package:test/test.dart';
import 'helper.dart';
@ -8,7 +9,7 @@ void main() {
'dashboard',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(container);

17
packages/nextcloud/test/helper.dart

@ -75,20 +75,7 @@ class DockerContainer {
Future<String> allLogs() async => '${await serverLogs()}\n\n${await nextcloudLogs()}';
}
class TestNextcloudClient extends NextcloudClient {
TestNextcloudClient(
super.baseURL, {
super.loginName,
super.password,
super.appPassword,
super.language,
super.appType,
super.userAgentOverride,
super.cookieJar,
});
}
Future<TestNextcloudClient> getTestClient(
Future<NextcloudClient> getTestClient(
final DockerContainer container, {
final String? username = 'user1',
final AppType appType = AppType.unknown,
@ -121,7 +108,7 @@ Future<TestNextcloudClient> getTestClient(
appPassword = (result.stdout as String).split('\n')[1];
}
final client = TestNextcloudClient(
final client = NextcloudClient(
Uri(
scheme: 'http',
host: 'localhost',

2
packages/nextcloud/test/news_test.dart

@ -11,7 +11,7 @@ void main() {
'news',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(container);

2
packages/nextcloud/test/notes_test.dart

@ -10,7 +10,7 @@ void main() {
'notes',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(container);

5
packages/nextcloud/test/notifications_test.dart

@ -1,5 +1,6 @@
import 'dart:async';
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/notifications.dart';
import 'package:test/test.dart';
@ -8,7 +9,7 @@ import 'helper.dart';
void main() {
group('notifications', () {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(
@ -107,7 +108,7 @@ void main() {
group('Push', () {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(

3
packages/nextcloud/test/provisioning_api_test.dart

@ -1,3 +1,4 @@
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/provisioning_api.dart';
import 'package:test/test.dart';
@ -8,7 +9,7 @@ void main() {
'provisioning_api',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(

3
packages/nextcloud/test/settings_test.dart

@ -1,5 +1,6 @@
import 'dart:convert';
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/settings.dart';
import 'package:test/test.dart';
@ -10,7 +11,7 @@ void main() {
'settings',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(

3
packages/nextcloud/test/spreed_test.dart

@ -3,6 +3,7 @@ import 'dart:convert';
import 'package:built_value/json_object.dart';
import 'package:nextcloud/core.dart' as core;
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/spreed.dart' as spreed;
import 'package:test/test.dart';
@ -13,7 +14,7 @@ void main() {
'spreed',
() {
late DockerContainer container;
late TestNextcloudClient client1;
late NextcloudClient client1;
setUp(() async {
container = await getDockerContainer();
client1 = await getTestClient(container);

3
packages/nextcloud/test/uppush_test.dart

@ -1,3 +1,4 @@
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/uppush.dart';
import 'package:test/test.dart';
@ -8,7 +9,7 @@ void main() {
'uppush',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(

3
packages/nextcloud/test/user_status_test.dart

@ -1,3 +1,4 @@
import 'package:nextcloud/nextcloud.dart';
import 'package:nextcloud/user_status.dart' as user_status;
import 'package:test/test.dart';
@ -8,7 +9,7 @@ void main() {
'user_status',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();
client = await getTestClient(container);

2
packages/nextcloud/test/webdav_test.dart

@ -139,7 +139,7 @@ void main() {
'webdav',
() {
late DockerContainer container;
late TestNextcloudClient client;
late NextcloudClient client;
setUp(() async {
container = await getDockerContainer();

Loading…
Cancel
Save