|
|
|
@ -4,11 +4,14 @@ import 'package:test/test.dart';
|
|
|
|
|
import 'helper.dart'; |
|
|
|
|
|
|
|
|
|
void main() { |
|
|
|
|
for (final serverVersion in coreSupportedVersions) { |
|
|
|
|
final serverVersionMajor = int.parse(serverVersion.split('.').first); |
|
|
|
|
group( |
|
|
|
|
'core', |
|
|
|
|
serverVersion, |
|
|
|
|
() { |
|
|
|
|
group('core', () { |
|
|
|
|
late DockerImage image; |
|
|
|
|
setUpAll(() async => image = await getDockerImage()); |
|
|
|
|
setUpAll(() async => image = await getDockerImage(serverVersion: serverVersion)); |
|
|
|
|
|
|
|
|
|
late DockerContainer container; |
|
|
|
|
late TestNextcloudClient client; |
|
|
|
@ -33,8 +36,8 @@ void main() {
|
|
|
|
|
expect(status.installed, true); |
|
|
|
|
expect(status.maintenance, false); |
|
|
|
|
expect(status.needsDbUpgrade, false); |
|
|
|
|
expect(status.version, startsWith('$coreSupportedVersion.')); |
|
|
|
|
expect(status.versionstring, startsWith('$coreSupportedVersion.')); |
|
|
|
|
expect(status.version, startsWith('$serverVersion.')); |
|
|
|
|
expect(status.versionstring, serverVersion); |
|
|
|
|
expect(status.edition, ''); |
|
|
|
|
expect(status.productname, 'Nextcloud'); |
|
|
|
|
expect(status.extendedSupport, false); |
|
|
|
@ -42,8 +45,8 @@ void main() {
|
|
|
|
|
|
|
|
|
|
test('Get capabilities', () async { |
|
|
|
|
final capabilities = await client.core.ocs.getCapabilities(); |
|
|
|
|
expect(capabilities.ocs.data.version.major, coreSupportedVersion); |
|
|
|
|
expect(capabilities.ocs.data.version.string, startsWith('$coreSupportedVersion.')); |
|
|
|
|
expect(capabilities.ocs.data.version.major, serverVersionMajor); |
|
|
|
|
expect(capabilities.ocs.data.version.string, serverVersion); |
|
|
|
|
expect(capabilities.ocs.data.capabilities.commentsCapabilities, isNotNull); |
|
|
|
|
expect(capabilities.ocs.data.capabilities.davCapabilities, isNotNull); |
|
|
|
|
expect(capabilities.ocs.data.capabilities.filesCapabilities, isNotNull); |
|
|
|
@ -108,7 +111,7 @@ void main() {
|
|
|
|
|
expect(response.ocs.data[2].subline, ''); |
|
|
|
|
expect(response.ocs.data[2].shareWithDisplayNameUnique, ''); |
|
|
|
|
}, |
|
|
|
|
skip: true, // TODO: This test only works on 28+ due to a bug fix with the status |
|
|
|
|
skip: serverVersionMajor < 28, // This test only works on 28+ due to a bug fix with the status |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
test('Get preview', () async { |
|
|
|
@ -155,8 +158,10 @@ void main() {
|
|
|
|
|
expect(response.ocs.data.entries.single.rounded, isFalse); |
|
|
|
|
expect(response.ocs.data.entries.single.attributes, isEmpty); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
retry: retryCount, |
|
|
|
|
timeout: timeout, |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|