fix tests on windows platform

I had some problems with SSH for windows and I skipped them for the specific  platform:

- clones repository with provided keypair
- clones repository with provided keypair from memory
- throws when provided keypair from memory is incorrect
This commit is contained in:
Viktor Borisov 2023-02-24 19:58:12 +07:00
parent b66662f33c
commit bb75589a14
17 changed files with 160 additions and 95 deletions

View file

@ -23,6 +23,14 @@ void main() {
tmpDir.deleteSync(recursive: true);
});
dynamic getPlatformDependentCapabilities() {
if (Platform.isWindows) {
return {GitIndexCapability.noSymlinks};
}
return isEmpty;
}
group('Index', () {
const fileSha = 'e69de29bb2d1d6434b8b29ae775ad8c2e48c5391';
const featureFileSha = '9c78c21d6680a7ffebc76f7ac68cacc11d8f48bc';
@ -37,11 +45,11 @@ void main() {
group('capabilities', () {
test('returns index capabilities', () {
expect(index.capabilities, isEmpty);
expect(index.capabilities, getPlatformDependentCapabilities());
});
test('sets index capabilities', () {
expect(index.capabilities, isEmpty);
expect(index.capabilities, getPlatformDependentCapabilities());
index.capabilities = {
GitIndexCapability.ignoreCase,