git2consul
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"name": "git2consul", | ||
"description": "System for moving data from git to consul", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"contributors": [ | ||
@@ -29,3 +29,3 @@ { | ||
"cov": "XUNIT_FILE=\"reports/TESTS-xunit.xml\" node_modules/.bin/istanbul cover --root lib --dir ./reports ./node_modules/.bin/_mocha -- --reporter xunit-file -t 10000 test", | ||
"test": "./node_modules/.bin/_mocha --reporter spec -t 10000 test" | ||
"test_unix": "./node_modules/.bin/_mocha --reporter spec -t 10000 test" | ||
}, | ||
@@ -32,0 +32,0 @@ "licenses": [ |
@@ -51,3 +51,3 @@ var should = require('should'); | ||
// has fired we know that we are mirroring and managing the master branch locally. | ||
git_utils.addFileToGitRepo(sample_key, sample_value, "Pull test.", function(err) { | ||
git_utils.addFileToGitRepo(sample_key, sample_value, "Create a git repo.", function(err) { | ||
if (err) return done(err); | ||
@@ -64,2 +64,19 @@ | ||
it ('should handle creating a git_manager around a repo that is been emptied', function(done) { | ||
var default_repo_config = git_utils.createConfig().repos[0]; | ||
// This addFileToGitRepo will automatically create a git_manager in git_utils, so once the callback | ||
// has fired we know that we are mirroring and managing the master branch locally. | ||
git_utils.deleteFileFromGitRepo('readme.md', "Clearing repo.", function(err) { | ||
if (err) return done(err); | ||
// Now we create another git_manager around the same repo with the same local address. This tells | ||
// us that a git_manager can be created around an existing repo without issue. | ||
git_manager.manageRepo(default_repo_config, function(err, gm) { | ||
(err === null).should.equal(true); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
it ('should handle populating consul when you create a git_manager around a repo that is already on disk', function(done) { | ||
@@ -66,0 +83,0 @@ var default_repo_config = git_utils.createConfig().repos[0]; |
67824
30
1445