store test repos as archives
This commit is contained in:
parent
9d3b69a474
commit
40933ca1d7
@ -11,7 +11,5 @@ notify:
|
|||||||
console:
|
console:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- cmd: sleep 2
|
- cmd: npm install && npm prune
|
||||||
- cmd: >
|
- cmd: npm test
|
||||||
cd ../../../../ &&
|
|
||||||
npm test
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 39245d9b93bcd2a0c6708d483b83c98a7bff1d3e
|
|
BIN
test/repos/git.tar.gz
Normal file
BIN
test/repos/git.tar.gz
Normal file
Binary file not shown.
BIN
test/repos/mercurial.tar.gz
Normal file
BIN
test/repos/mercurial.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
default
|
|
@ -1,2 +0,0 @@
|
|||||||
2ff4bec8b4ccc89af0bcabc0710713573078ebdb 3
|
|
||||||
2ff4bec8b4ccc89af0bcabc0710713573078ebdb default
|
|
5
test/repos/mercurial/.hg/cache/tags
vendored
5
test/repos/mercurial/.hg/cache/tags
vendored
@ -1,5 +0,0 @@
|
|||||||
3 2ff4bec8b4ccc89af0bcabc0710713573078ebdb 8354ec217ac72171221f831e40a640e499e0f246
|
|
||||||
|
|
||||||
da2762e71e87935198a25b0fceab0a364ad2e6d7 zero revision
|
|
||||||
9d7d08445f4ce095c22a98a902a391973cf07f37 second revision
|
|
||||||
9d7d08445f4ce095c22a98a902a391973cf07f37 release 0.1.0
|
|
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
temporary amend commit for 6e9e54ed42ff
|
|
@ -1,4 +0,0 @@
|
|||||||
dotencode
|
|
||||||
fncache
|
|
||||||
revlogv1
|
|
||||||
store
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,4 +0,0 @@
|
|||||||
data/.hgtags.i
|
|
||||||
data/rev0.txt.i
|
|
||||||
data/rev1.txt.i
|
|
||||||
data/rev2.txt.i
|
|
@ -1 +0,0 @@
|
|||||||
1 da2762e71e87935198a25b0fceab0a364ad2e6d7
|
|
@ -1,3 +0,0 @@
|
|||||||
da2762e71e87935198a25b0fceab0a364ad2e6d7 zero revision
|
|
||||||
9d7d08445f4ce095c22a98a902a391973cf07f37 second revision
|
|
||||||
9d7d08445f4ce095c22a98a902a391973cf07f37 release 0.1.0
|
|
23
test/scm.js
23
test/scm.js
@ -19,12 +19,31 @@ var getTestData = function(type) {
|
|||||||
describe(type, function() {
|
describe(type, function() {
|
||||||
var data = getTestData(type),
|
var data = getTestData(type),
|
||||||
repositoryName = 'test-repository',
|
repositoryName = 'test-repository',
|
||||||
repositoryPath = path.join(path.join(__dirname, 'repos'), repositoryName);
|
repositoryPath = path.join(
|
||||||
|
path.join(__dirname, 'repos'), repositoryName
|
||||||
|
),
|
||||||
|
originalRepositoryPath = path.join(__dirname, 'repos', type);
|
||||||
|
|
||||||
function rmdir(dir, callback) {
|
function rmdir(dir, callback) {
|
||||||
new SpawnCommand().run({cmd: 'rm', args: ['-R', dir]}, callback);
|
new SpawnCommand().run({cmd: 'rm', args: ['-R', dir]}, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
it('remove original repository dir if it exists', function(done) {
|
||||||
|
if (fs.exists(originalRepositoryPath, function(isExists) {
|
||||||
|
if (isExists) {
|
||||||
|
rmdir(originalRepositoryPath, done);
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
});
|
||||||
|
|
||||||
|
it('unpack original repository', function(done) {
|
||||||
|
new SpawnCommand().run({cmd: 'tar', args: [
|
||||||
|
'-xvf', type + '.tar.gz'
|
||||||
|
], options: {cwd: path.join(__dirname, 'repos')}}, done);
|
||||||
|
});
|
||||||
|
|
||||||
it('remove test repository dir if it exists', function(done) {
|
it('remove test repository dir if it exists', function(done) {
|
||||||
if (fs.exists(repositoryPath, function(isExists) {
|
if (fs.exists(repositoryPath, function(isExists) {
|
||||||
if (isExists) {
|
if (isExists) {
|
||||||
@ -40,7 +59,7 @@ var getTestData = function(type) {
|
|||||||
it('create scm instance attached to new repository without errors', function() {
|
it('create scm instance attached to new repository without errors', function() {
|
||||||
scm = createScm({
|
scm = createScm({
|
||||||
type: type,
|
type: type,
|
||||||
repository: path.join(__dirname, 'repos', type)
|
repository: originalRepositoryPath
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user