You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
why: New CLI behavior needs regression coverage for relative paths, workspace overrides, tilde log output, and legacy positional rejection.
what:
- extend path fixtures to toggle relative inputs, workspace overrides, and dry-run tilde assertions
- normalize logs for snapshots while preserving contracted config paths when required
- add unit checks for dry-run logging and parser rejection of extra positional args
Copy file name to clipboardExpand all lines: tests/cli/__snapshots__/test_add.ambr
+56-11Lines changed: 56 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
dict({
4
4
'log': '''
5
5
WARNING vcspull.cli.add:add.py:<line> • Duplicate workspace root ~/study/python/ appears 2 times; skipping merge because --no-merge was provided.
6
-
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/avast/pytest-docker.git) to <config> under '~/study/python/'.
6
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/avast/pytest-docker.git) to ~/.vcspull.yaml under '~/study/python/'.
7
7
8
8
''',
9
9
'test_id': 'merge-off',
@@ -13,7 +13,7 @@
13
13
dict({
14
14
'log': '''
15
15
INFO vcspull.cli.add:add.py:<line> • Merged 2 duplicate entries for workspace root ~/study/python/
16
-
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/avast/pytest-docker.git) to <config> under '~/study/python/'.
16
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/avast/pytest-docker.git) to ~/.vcspull.yaml under '~/study/python/'.
17
17
18
18
''',
19
19
'test_id': 'merge-on',
@@ -27,13 +27,28 @@
27
27
INFO vcspull.cli.add:add.py:<line> • workspace: ~/study/python/
28
28
INFO vcspull.cli.add:add.py:<line> ↳ path: ~/study/python/pytest-docker
29
29
INFO vcspull.cli.add:add.py:<line> ? Import this repository? [y/N]: y (auto-confirm)
30
-
INFO vcspull.cli.add:add.py:<line> Config file <config> not found. A new one will be created.
31
-
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/avast/pytest-docker) to <config> under '~/study/python/'.
30
+
INFO vcspull.cli.add:add.py:<line> Config file ~/.vcspull.yaml not found. A new one will be created.
31
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/avast/pytest-docker) to ~/.vcspull.yaml under '~/study/python/'.
INFO vcspull.cli.add:add.py:<line> • workspace: ~/study/python/
43
58
INFO vcspull.cli.add:add.py:<line> ↳ path: ~/study/python/pytest-docker
44
59
INFO vcspull.cli.add:add.py:<line> ? Import this repository? [y/N]: y (auto-confirm)
45
-
INFO vcspull.cli.add:add.py:<line> Config file <config> not found. A new one will be created.
46
-
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/manual/source) to <config> under '~/study/python/'.
60
+
INFO vcspull.cli.add:add.py:<line> Config file ~/.vcspull.yaml not found. A new one will be created.
61
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/manual/source) to ~/.vcspull.yaml under '~/study/python/'.
47
62
48
63
''',
49
64
'test_id': 'path-explicit-url',
@@ -56,8 +71,8 @@
56
71
INFO vcspull.cli.add:add.py:<line> + project-alias (https://github.com/example/project)
57
72
INFO vcspull.cli.add:add.py:<line> • workspace: ~/study/python/
58
73
INFO vcspull.cli.add:add.py:<line> ↳ path: ~/study/python/pytest-docker
59
-
INFO vcspull.cli.add:add.py:<line> Config file <config> not found. A new one will be created.
60
-
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'project-alias' (git+https://github.com/example/project) to <config> under '~/study/python/'.
74
+
INFO vcspull.cli.add:add.py:<line> Config file ~/.vcspull.yaml not found. A new one will be created.
75
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'project-alias' (git+https://github.com/example/project) to ~/.vcspull.yaml under '~/study/python/'.
61
76
62
77
''',
63
78
'test_id': 'path-interactive-accept',
@@ -85,7 +100,7 @@
85
100
INFO vcspull.cli.add:add.py:<line> ↳ path: ~/study/python/pytest-docker
86
101
INFO vcspull.cli.add:add.py:<line> ? Import this repository? [y/N]: y (auto-confirm)
87
102
WARNING vcspull.cli.add:add.py:<line> • Duplicate workspace root ~/study/python/ appears 2 times; skipping merge because --no-merge was provided.
88
-
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/example/no-merge) to <config> under '~/study/python/'.
103
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/example/no-merge) to ~/.vcspull.yaml under '~/study/python/'.
89
104
90
105
''',
91
106
'test_id': 'path-no-merge',
@@ -100,10 +115,40 @@
100
115
INFO vcspull.cli.add:add.py:<line> • workspace: ~/study/python/
101
116
INFO vcspull.cli.add:add.py:<line> ↳ path: ~/study/python/pytest-docker
102
117
INFO vcspull.cli.add:add.py:<line> ? Import this repository? [y/N]: y (auto-confirm)
103
-
INFO vcspull.cli.add:add.py:<line> Config file <config> not found. A new one will be created.
104
-
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (<repo_path>) to <config> under '~/study/python/'.
118
+
INFO vcspull.cli.add:add.py:<line> Config file ~/.vcspull.yaml not found. A new one will be created.
119
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (<repo_path>) to ~/.vcspull.yaml under '~/study/python/'.
INFO vcspull.cli.add:add.py:<line> Found new repository to import:
129
+
INFO vcspull.cli.add:add.py:<line> + pytest-docker (https://github.com/example/rel)
130
+
INFO vcspull.cli.add:add.py:<line> • workspace: ~/study/python/
131
+
INFO vcspull.cli.add:add.py:<line> ↳ path: ~/study/python/pytest-docker
132
+
INFO vcspull.cli.add:add.py:<line> ? Import this repository? [y/N]: y (auto-confirm)
133
+
INFO vcspull.cli.add:add.py:<line> Config file ~/.vcspull.yaml not found. A new one will be created.
134
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/example/rel) to ~/.vcspull.yaml under '~/study/python/'.
INFO vcspull.cli.add:add.py:<line> Found new repository to import:
144
+
INFO vcspull.cli.add:add.py:<line> + pytest-docker (https://github.com/example/workspace)
145
+
INFO vcspull.cli.add:add.py:<line> • workspace: ~/custom/
146
+
INFO vcspull.cli.add:add.py:<line> ↳ path: ~/study/python/pytest-docker
147
+
INFO vcspull.cli.add:add.py:<line> ? Import this repository? [y/N]: y (auto-confirm)
148
+
INFO vcspull.cli.add:add.py:<line> Config file ~/.vcspull.yaml not found. A new one will be created.
149
+
INFO vcspull.cli.add:add.py:<line> ✓ Successfully added 'pytest-docker' (git+https://github.com/example/workspace) to ~/.vcspull.yaml under '~/custom/'.
0 commit comments