test: fix test failing on windows

This commit is contained in:
Aleksey Kulikov 2022-05-02 15:24:08 +03:00
parent fc1dac6f96
commit 5334ec23dd

View file

@ -473,13 +473,8 @@ Total 69 (delta 0), reused 1 (delta 0), pack-reused 68
);
test('pushes with update reference callback', () {
final originDir =
Directory(p.join(Directory.systemTemp.path, 'origin_testrepo'));
final originDir = Directory.systemTemp.createTempSync('origin');
if (originDir.existsSync()) {
originDir.deleteSync(recursive: true);
}
originDir.createSync();
copyRepo(
from: Directory(p.join('test', 'assets', 'empty_bare.git')),
to: originDir,
@ -504,7 +499,9 @@ Total 69 (delta 0), reused 1 (delta 0), pack-reused 68
);
expect(updateRefOutput, {'refs/heads/master': ''});
if (Platform.isLinux || Platform.isMacOS) {
originDir.deleteSync(recursive: true);
}
});
test('throws when trying to push to invalid url', () {