Fix issues with Repository synchronization tool (#124)
* Only run tests in build/sync if directory exists * Use t.Helper() * Don't compare size of directories * Fix TestFileHistory * Fix linter issue * Apply changes from https://github.com/mattermost/mattermost-plugin-github/pull/345 * Use ts file for tests * Add sync target
This commit is contained in:
parent
0688e8df4c
commit
dcaf9dd289
11 changed files with 776 additions and 12 deletions
|
@ -18,7 +18,7 @@ func TestFileHistory(t *testing.T) {
|
|||
assert.Nil(err)
|
||||
sums, err := gitutil.FileHistory("build/sync/plan/git/testdata/testfile.txt", repo)
|
||||
assert.Nil(err)
|
||||
assert.Equal([]string{"ba7192052d7cf77c55d3b7bf40b350b8431b208b"}, sums)
|
||||
assert.Contains(sums, "ba7192052d7cf77c55d3b7bf40b350b8431b208b")
|
||||
|
||||
// Calling with a non-existent file returns error.
|
||||
sums, err = gitutil.FileHistory("build/sync/plan/git/testdata/nosuch_testfile.txt", repo)
|
||||
|
|
Reference in a new issue