tests: fix tests on travis

Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
Ruslan Kuprieiev
2019-02-07 08:43:43 +02:00
parent 92d4acc978
commit c95e6eb856
3 changed files with 18 additions and 5 deletions
+10 -4
View File
@@ -742,8 +742,14 @@ class TestCheckSumRecalculation(TestDvc):
test_collect = spy(State._collect)
with patch.object(State, "_collect", test_collect):
url = get_local_url()
main(["remote", "add", "-d", TEST_REMOTE, url])
main(["add", self.FOO])
main(["push"])
main(["run", "-d", self.FOO, "echo foo"])
ret = main(["remote", "add", "-d", TEST_REMOTE, url])
self.assertEqual(ret, 0)
ret = main(["config", "cache.type", "hardlink"])
self.assertEqual(ret, 0)
ret = main(["add", self.FOO])
self.assertEqual(ret, 0)
ret = main(["push"])
self.assertEqual(ret, 0)
ret = main(["run", "-d", self.FOO, "echo foo"])
self.assertEqual(ret, 0)
self.assertEqual(test_collect.mock.call_count, 1)