mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
test: temporarily disable ssh tests on linux
Version of Ubuntu used for tests on ci have old version of libssh2 that makes tests fail. Disabling 2 tests until github actions will provide newer version of Ubuntu.
This commit is contained in:
parent
21056ca4e6
commit
69d45b6f1b
1 changed files with 44 additions and 36 deletions
|
@ -95,25 +95,29 @@ void main() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('clones repository with provided keypair', () {
|
test(
|
||||||
final keypair = Keypair(
|
'clones repository with provided keypair',
|
||||||
username: 'git',
|
() {
|
||||||
pubKey: p.join('test', 'assets', 'keys', 'id_rsa.pub'),
|
final keypair = Keypair(
|
||||||
privateKey: p.join('test', 'assets', 'keys', 'id_rsa'),
|
username: 'git',
|
||||||
passPhrase: 'empty',
|
pubKey: p.join('test', 'assets', 'keys', 'id_rsa.pub'),
|
||||||
);
|
privateKey: p.join('test', 'assets', 'keys', 'id_rsa'),
|
||||||
final callbacks = Callbacks(credentials: keypair);
|
passPhrase: 'empty',
|
||||||
|
);
|
||||||
|
final callbacks = Callbacks(credentials: keypair);
|
||||||
|
|
||||||
final repo = Repository.clone(
|
final repo = Repository.clone(
|
||||||
url: 'ssh://git@github.com/libgit2/TestGitRepository',
|
url: 'ssh://git@github.com/libgit2/TestGitRepository',
|
||||||
localPath: cloneDir.path,
|
localPath: cloneDir.path,
|
||||||
callbacks: callbacks,
|
callbacks: callbacks,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(repo.isEmpty, false);
|
expect(repo.isEmpty, false);
|
||||||
|
|
||||||
repo.free();
|
repo.free();
|
||||||
});
|
},
|
||||||
|
testOn: '!linux',
|
||||||
|
);
|
||||||
|
|
||||||
test('throws when no credentials is provided', () {
|
test('throws when no credentials is provided', () {
|
||||||
expect(
|
expect(
|
||||||
|
@ -181,29 +185,33 @@ void main() {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('clones repository with provided keypair from memory', () {
|
test(
|
||||||
final pubKey = File(p.join('test', 'assets', 'keys', 'id_rsa.pub'))
|
'clones repository with provided keypair from memory',
|
||||||
.readAsStringSync();
|
() {
|
||||||
final privateKey =
|
final pubKey = File(p.join('test', 'assets', 'keys', 'id_rsa.pub'))
|
||||||
File(p.join('test', 'assets', 'keys', 'id_rsa')).readAsStringSync();
|
.readAsStringSync();
|
||||||
final keypair = KeypairFromMemory(
|
final privateKey =
|
||||||
username: 'git',
|
File(p.join('test', 'assets', 'keys', 'id_rsa')).readAsStringSync();
|
||||||
pubKey: pubKey,
|
final keypair = KeypairFromMemory(
|
||||||
privateKey: privateKey,
|
username: 'git',
|
||||||
passPhrase: 'empty',
|
pubKey: pubKey,
|
||||||
);
|
privateKey: privateKey,
|
||||||
final callbacks = Callbacks(credentials: keypair);
|
passPhrase: 'empty',
|
||||||
|
);
|
||||||
|
final callbacks = Callbacks(credentials: keypair);
|
||||||
|
|
||||||
final repo = Repository.clone(
|
final repo = Repository.clone(
|
||||||
url: 'ssh://git@github.com/libgit2/TestGitRepository',
|
url: 'ssh://git@github.com/libgit2/TestGitRepository',
|
||||||
localPath: cloneDir.path,
|
localPath: cloneDir.path,
|
||||||
callbacks: callbacks,
|
callbacks: callbacks,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(repo.isEmpty, false);
|
expect(repo.isEmpty, false);
|
||||||
|
|
||||||
repo.free();
|
repo.free();
|
||||||
});
|
},
|
||||||
|
testOn: '!linux',
|
||||||
|
);
|
||||||
|
|
||||||
test('throws when provided keypair from memory is incorrect', () {
|
test('throws when provided keypair from memory is incorrect', () {
|
||||||
final pubKey = File(p.join('test', 'assets', 'keys', 'id_rsa.pub'))
|
final pubKey = File(p.join('test', 'assets', 'keys', 'id_rsa.pub'))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue