Commit Graph
65 Commits
Author SHA1 Message Date
Ruslan Kuprieiev 93326c99ad tests: utils: don't forget to init env 2017-08-07 02:26:26 +03:00
Ruslan Kuprieiev c7df4bd0ba tests: add test for utils.py
Some sanity tests to make sure something like #132
doesn't happen anymore.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-07 01:36:26 +03:00
Ruslan Kuprieiev b5623a32bd cli: fix help, 'run', 'repro' and 'sync'
Adding metavar='' is a legacy from previous design and should
be removed to achieve better help msgs.

'run' should have 'command' as a positional and _required_ argument and 'args'
as a remainder.

'repro' had CmdRun triggered when called from cli.

'sync' should have 'targets' as a positional and _required_ argument.

Fixes #136.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-03 04:55:07 +03:00
Ruslan Kuprieiev ee34fdfa31 RFC: move cmdline parsing to cli.py and settings RFC
This will make the structure of dvc more linear
making it easier to read. Plus, these changes
are needed in preparation for libdvc, as they
move all cmdline parsing to one common place.

This patch also refactors our settings system
also make it more linear and remove abstraction
levels that are not needed and only cause confusion.
There is a lot more to be done in preparation for
dvc lib and RFC overall, but this a first step
in that long journey.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-07-31 01:39:32 +03:00
Dmitry Petrov 884d4e6d83 Imports clean up 2017-07-25 05:03:48 -07:00
Dmitry Petrov b08f4ee41c Unit tests 2017-07-25 05:02:25 -07:00
Dmitry Petrov 3f962deb25 Fix: NamedTemporaryFile(mode=w) 2017-06-19 21:59:26 -07:00
Dmitry Petrov ed923db203 Import cmd unit-tests 2017-06-19 21:31:31 -07:00
Dmitry Petrov 71566b1a24 Rename CmdDataRemove class 2017-06-19 18:32:30 -07:00
Dmitry Petrov 05dfaa3d48 Rename file test_cmd_data_remove 2017-06-19 18:29:44 -07:00
Dmitry Petrov 0e3278641c Small tests headers fixes 2017-06-19 18:21:58 -07:00
Dmitry Petrov 9062da3f79 Tests for GC command 2017-06-17 17:08:17 -07:00
Ruslan Kuprieiev 4078e902d1 test_config: python3 fix
1) use io for StringIO in python3
2) use builtins instead of __builtin__
3) use StringIO instead of BytesIO when mocking aws config
Othervise this test fails on python3.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-06-12 00:22:19 +03:00
Ruslan Kuprieiev 0d3ef3c22f test: fix test_config
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-06-11 22:25:43 +03:00
Ruslan Kuprieiev a01ef3197c dvc: misc changes for DataCloud, 'data sync' and 'remove'
This patch introduces DataCloud class that used config to
determine proper cloud class(DataCloudAWS and DataCloudGCP
are awailable) to use in "data_sync" and "remove" commands.

This patch focuses on introducing the common class itself
saving original code and definetly needs some RFC later.

It also adds simple DataCloudLOCAL class that uses directory
as a StoragePath and cp as a sync method. Which makes testing
so much easier and covers local scenarios.

And it also introduces ability to run data sync in parallel
by collecting files first and then running sync in a number
of threads.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-05-28 22:28:58 +03:00
Dmitry Petrov e2f39a522a Fix unit tests 2017-05-02 23:12:57 -07:00
Dmitry Petrov f6ded2fa72 Lock cmd: small changes 2017-04-29 18:01:24 -07:00
Dmitry Petrov a7f8989575 Unit tests 2017-04-28 15:03:33 -07:00
Dmitry Petrov 22088a4d38 Include implicit code dependencies from argv. Close #46 2017-04-27 00:42:38 -07:00
Dmitry Petrov 7c9a52e879 Repro fixes. Close #43. Close #42 2017-04-24 19:21:13 -07:00
Dmitry Petrov e69b873357 Fix CmdRemove tests 2017-04-24 16:24:45 -07:00
Earl Hathaway 7e2d1f341b stop unit test from leaving myfile.py behind 2017-04-22 17:48:51 -07:00
Earl 037758e20d Merge pull request #33 from dmpetrov/elh_config
config modifications
2017-04-22 17:44:16 -07:00
Earl Hathaway 0a6d831bfc tests around reading aws credentials 2017-04-22 17:28:02 -07:00
Dmitry Petrov b5dd8c1d71 Fix repro command. Close #31 2017-04-19 03:07:04 -07:00
Dmitry Petrov 48c86267e7 Windows symlink: fix executor tests and small bugs 2017-04-10 21:49:10 -07:00
Dmitry Petrov 4578b6aeb4 Windows symlink: extract all system depended code to System static class 2017-04-10 21:04:40 -07:00
Dmitry Petrov 92553358e6 Windows symlink: more small fixes 2017-04-10 14:32:26 -07:00
Dmitry Petrov 376f139f81 Windows symlink: replace echo to python code and fix --shell command line propagation 2017-04-10 12:47:03 -07:00
Dmitry Petrov f539fa8c60 Windows symlink: wrap tempfile.mkdtemp() to long path func 2017-04-10 12:20:06 -07:00
Dmitry Petrov f628c28d3d Windows symlink: forgotten ls change 2017-04-10 12:08:19 -07:00
Dmitry Petrov e144bd3b7b Windows symlink: multiplatform ls command for unittests 2017-04-10 12:06:34 -07:00
Dmitry Petrov 741ad5435a Windows symlink: rewrite unit test for windows 2017-04-09 14:22:17 -07:00
Dmitry Petrov 7a12395cd1 Existing data file cache path fix; Executor shell fix. 2017-04-09 01:06:27 -07:00
Dmitry Petrov b706f60959 Windows symlink: exec cmd as shell option; small os.path.join() test fix 2017-04-08 17:57:16 -07:00
Dmitry Petrov 4ce1e43041 Revert "Windows symlink: extract rmfile() to utils"
This reverts commit 9b52063279.
2017-04-08 17:44:03 -07:00
Dmitry Petrov 9b52063279 Windows symlink: extract rmfile() to utils 2017-04-08 17:14:44 -07:00
Dmitry Petrov f42e4840e8 Windows symlink: rmtree() and small fixes 2017-04-07 21:26:39 -07:00
Dmitry Petrov a6ceb02f97 WindowsSymlinkOverride class 2017-04-07 18:22:22 -07:00
Dmitry Petrov 449517c511 Windows symlink 2017-04-07 17:44:25 -07:00
Dmitry Petrov e1ef7e2f5c Small improvements: repro and remove commands 2017-04-05 23:33:33 -07:00
Dmitry Petrov 5f3c53603f Refactoring: extract Settings from BaseCmd; move path_factory to Settings 2017-04-05 23:08:40 -07:00
Dmitry Petrov c3c2116220 Close #1 - repro cmd and close #2 repro unit tese 2017-04-05 20:41:35 -07:00
Dmitry Petrov 84218deccb Finalize ReproCodeDependencyTest 2017-04-03 15:02:49 -07:00
Dmitry Petrov dccc15c0d6 Repro cmd first unttest 2017-04-03 03:56:08 -07:00
Dmitry Petrov 2f8c2e9397 Fix: change dir back 2017-04-03 00:02:12 -07:00
Dmitry Petrov 84de06ca0a Unittest for run cmd 2017-04-02 22:29:59 -07:00
Dmitry Petrov 73039f00f2 Run cmd refactoring 2017-04-02 19:35:15 -07:00
Dmitry Petrov a6ec1ea9bf More tests for RepositoryChange 2017-03-26 22:46:05 -07:00
Dmitry Petrov 721ddfa391 Add RepositoryChange unit test 2017-03-26 21:43:12 -07:00