clonebox 0.1.13__tar.gz → 0.1.15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {clonebox-0.1.13/src/clonebox.egg-info → clonebox-0.1.15}/PKG-INFO +137 -27
- {clonebox-0.1.13 → clonebox-0.1.15}/README.md +130 -26
- {clonebox-0.1.13 → clonebox-0.1.15}/pyproject.toml +36 -1
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox/cli.py +155 -6
- clonebox-0.1.15/src/clonebox/models.py +128 -0
- clonebox-0.1.15/src/clonebox/validator.py +374 -0
- {clonebox-0.1.13 → clonebox-0.1.15/src/clonebox.egg-info}/PKG-INFO +137 -27
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox.egg-info/SOURCES.txt +5 -1
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox.egg-info/requires.txt +7 -0
- clonebox-0.1.15/tests/test_cli.py +405 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/tests/test_cloner.py +23 -32
- {clonebox-0.1.13 → clonebox-0.1.15}/tests/test_detector.py +48 -28
- clonebox-0.1.15/tests/test_models.py +214 -0
- clonebox-0.1.15/tests/test_validator.py +286 -0
- clonebox-0.1.13/tests/test_cli.py +0 -207
- {clonebox-0.1.13 → clonebox-0.1.15}/LICENSE +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/setup.cfg +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox/__init__.py +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox/__main__.py +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox/cloner.py +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox/detector.py +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox.egg-info/dependency_links.txt +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox.egg-info/entry_points.txt +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/src/clonebox.egg-info/top_level.txt +0 -0
- {clonebox-0.1.13 → clonebox-0.1.15}/tests/test_network.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: clonebox
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.15
|
|
4
4
|
Summary: Clone your workstation environment to an isolated VM with selective apps, paths and services
|
|
5
5
|
Author: CloneBox Team
|
|
6
6
|
License: Apache-2.0
|
|
@@ -30,14 +30,26 @@ Requires-Dist: rich>=13.0.0
|
|
|
30
30
|
Requires-Dist: questionary>=2.0.0
|
|
31
31
|
Requires-Dist: psutil>=5.9.0
|
|
32
32
|
Requires-Dist: pyyaml>=6.0
|
|
33
|
+
Requires-Dist: pydantic>=2.0.0
|
|
33
34
|
Provides-Extra: dev
|
|
34
35
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
35
36
|
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
36
37
|
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
37
38
|
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
39
|
+
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
40
|
+
Provides-Extra: test
|
|
41
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
42
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
|
|
43
|
+
Requires-Dist: pytest-timeout>=2.0.0; extra == "test"
|
|
38
44
|
Dynamic: license-file
|
|
39
45
|
|
|
40
46
|
# CloneBox 📦
|
|
47
|
+
|
|
48
|
+
[](https://github.com/wronai/clonebox/actions)
|
|
49
|
+
[](https://pypi.org/project/clonebox/)
|
|
50
|
+
[](https://www.python.org/downloads/)
|
|
51
|
+
[](LICENSE)
|
|
52
|
+
|
|
41
53
|

|
|
42
54
|
|
|
43
55
|
```commandline
|
|
@@ -51,7 +63,8 @@ Dynamic: license-file
|
|
|
51
63
|
║ Clone your workstation to an isolated VM ║
|
|
52
64
|
╚═══════════════════════════════════════════════════════╝
|
|
53
65
|
```
|
|
54
|
-
|
|
66
|
+
|
|
67
|
+
> **Clone your workstation environment to an isolated VM in 60 seconds using bind mounts instead of disk cloning.**
|
|
55
68
|
|
|
56
69
|
CloneBox lets you create isolated virtual machines with only the applications, directories and services you need - using bind mounts instead of full disk cloning. Perfect for development, testing, or creating reproducible environments.
|
|
57
70
|
|
|
@@ -168,6 +181,61 @@ clonebox stop <name> # Zatrzymaj VM
|
|
|
168
181
|
clonebox delete <name> # Usuń VM
|
|
169
182
|
```
|
|
170
183
|
|
|
184
|
+
## Development and Testing
|
|
185
|
+
|
|
186
|
+
### Running Tests
|
|
187
|
+
|
|
188
|
+
CloneBox has comprehensive test coverage with unit tests and end-to-end tests:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# Run unit tests only (fast, no libvirt required)
|
|
192
|
+
make test
|
|
193
|
+
|
|
194
|
+
# Run fast unit tests (excludes slow tests)
|
|
195
|
+
make test-unit
|
|
196
|
+
|
|
197
|
+
# Run end-to-end tests (requires libvirt/KVM)
|
|
198
|
+
make test-e2e
|
|
199
|
+
|
|
200
|
+
# Run all tests including e2e
|
|
201
|
+
make test-all
|
|
202
|
+
|
|
203
|
+
# Run tests with coverage
|
|
204
|
+
make test-cov
|
|
205
|
+
|
|
206
|
+
# Run tests with verbose output
|
|
207
|
+
make test-verbose
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Test Categories
|
|
211
|
+
|
|
212
|
+
Tests are organized with pytest markers:
|
|
213
|
+
|
|
214
|
+
- **Unit tests**: Fast tests that mock libvirt/system calls (default)
|
|
215
|
+
- **E2E tests**: End-to-end tests requiring actual VM creation (marked with `@pytest.mark.e2e`)
|
|
216
|
+
- **Slow tests**: Tests that take longer to run (marked with `@pytest.mark.slow`)
|
|
217
|
+
|
|
218
|
+
E2E tests are automatically skipped when:
|
|
219
|
+
- libvirt is not installed
|
|
220
|
+
- `/dev/kvm` is not available
|
|
221
|
+
- Running in CI environment (`CI=true` or `GITHUB_ACTIONS=true`)
|
|
222
|
+
|
|
223
|
+
### Manual Test Execution
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Run only unit tests (exclude e2e)
|
|
227
|
+
pytest tests/ -m "not e2e"
|
|
228
|
+
|
|
229
|
+
# Run only e2e tests
|
|
230
|
+
pytest tests/e2e/ -m "e2e" -v
|
|
231
|
+
|
|
232
|
+
# Run specific test file
|
|
233
|
+
pytest tests/test_cloner.py -v
|
|
234
|
+
|
|
235
|
+
# Run with coverage
|
|
236
|
+
pytest tests/ -m "not e2e" --cov=clonebox --cov-report=html
|
|
237
|
+
```
|
|
238
|
+
|
|
171
239
|
## Quick Start
|
|
172
240
|
|
|
173
241
|
### Interactive Mode (Recommended)
|
|
@@ -258,42 +326,82 @@ ls ~/.mozilla/firefox # Firefox profile
|
|
|
258
326
|
ls ~/.config/JetBrains # PyCharm settings
|
|
259
327
|
```
|
|
260
328
|
|
|
261
|
-
### Testing VM Configuration
|
|
329
|
+
### Testing and Validating VM Configuration
|
|
262
330
|
|
|
263
331
|
```bash
|
|
264
332
|
# Quick test - basic checks
|
|
265
333
|
clonebox test . --user --quick
|
|
266
334
|
|
|
267
|
-
# Full
|
|
268
|
-
clonebox test . --user --
|
|
269
|
-
|
|
270
|
-
#
|
|
271
|
-
# ✅
|
|
272
|
-
# ✅
|
|
273
|
-
# ✅
|
|
274
|
-
# ✅
|
|
275
|
-
# ✅
|
|
276
|
-
# ✅
|
|
335
|
+
# Full validation - checks EVERYTHING against YAML config
|
|
336
|
+
clonebox test . --user --validate
|
|
337
|
+
|
|
338
|
+
# Validation checks:
|
|
339
|
+
# ✅ All mount points (paths + app_data_paths) are mounted and accessible
|
|
340
|
+
# ✅ All APT packages are installed
|
|
341
|
+
# ✅ All snap packages are installed
|
|
342
|
+
# ✅ All services are enabled and running
|
|
343
|
+
# ✅ Reports file counts for each mount
|
|
344
|
+
# ✅ Shows package versions
|
|
345
|
+
# ✅ Comprehensive summary table
|
|
346
|
+
|
|
347
|
+
# Example output:
|
|
348
|
+
# 💾 Validating Mount Points...
|
|
349
|
+
# ┌─────────────────────────┬─────────┬────────────┬────────┐
|
|
350
|
+
# │ Guest Path │ Mounted │ Accessible │ Files │
|
|
351
|
+
# ├─────────────────────────┼─────────┼────────────┼────────┤
|
|
352
|
+
# │ /home/ubuntu/Downloads │ ✅ │ ✅ │ 199 │
|
|
353
|
+
# │ ~/.config/JetBrains │ ✅ │ ✅ │ 45 │
|
|
354
|
+
# └─────────────────────────┴─────────┴────────────┴────────┘
|
|
355
|
+
# 12/14 mounts working
|
|
356
|
+
#
|
|
357
|
+
# 📦 Validating APT Packages...
|
|
358
|
+
# ┌─────────────────┬──────────────┬────────────┐
|
|
359
|
+
# │ Package │ Status │ Version │
|
|
360
|
+
# ├─────────────────┼──────────────┼────────────┤
|
|
361
|
+
# │ firefox │ ✅ Installed │ 122.0+b... │
|
|
362
|
+
# │ docker.io │ ✅ Installed │ 24.0.7-... │
|
|
363
|
+
# └─────────────────┴──────────────┴────────────┘
|
|
364
|
+
# 8/8 packages installed
|
|
365
|
+
#
|
|
366
|
+
# 📊 Validation Summary
|
|
367
|
+
# ┌────────────────┬────────┬────────┬───────┐
|
|
368
|
+
# │ Category │ Passed │ Failed │ Total │
|
|
369
|
+
# ├────────────────┼────────┼────────┼───────┤
|
|
370
|
+
# │ Mounts │ 12 │ 2 │ 14 │
|
|
371
|
+
# │ APT Packages │ 8 │ 0 │ 8 │
|
|
372
|
+
# │ Snap Packages │ 2 │ 0 │ 2 │
|
|
373
|
+
# │ Services │ 5 │ 1 │ 6 │
|
|
374
|
+
# │ TOTAL │ 27 │ 3 │ 30 │
|
|
375
|
+
# └────────────────┴────────┴────────┴───────┘
|
|
277
376
|
```
|
|
278
377
|
|
|
279
|
-
### VM Health Monitoring
|
|
378
|
+
### VM Health Monitoring and Mount Validation
|
|
280
379
|
|
|
281
380
|
```bash
|
|
282
|
-
# Check overall status
|
|
381
|
+
# Check overall status including mount validation
|
|
283
382
|
clonebox status . --user
|
|
284
383
|
|
|
285
|
-
# Output:
|
|
286
|
-
# 📊
|
|
287
|
-
#
|
|
288
|
-
#
|
|
289
|
-
#
|
|
290
|
-
#
|
|
291
|
-
|
|
292
|
-
#
|
|
384
|
+
# Output shows:
|
|
385
|
+
# 📊 VM State: running
|
|
386
|
+
# 🔍 Network and IP address
|
|
387
|
+
# ☁️ Cloud-init: Complete
|
|
388
|
+
# 💾 Mount Points status table:
|
|
389
|
+
# ┌─────────────────────────┬──────────────┬────────┐
|
|
390
|
+
# │ Guest Path │ Status │ Files │
|
|
391
|
+
# ├─────────────────────────┼──────────────┼────────┤
|
|
392
|
+
# │ /home/ubuntu/Downloads │ ✅ Mounted │ 199 │
|
|
393
|
+
# │ /home/ubuntu/Documents │ ❌ Not mounted│ ? │
|
|
394
|
+
# │ ~/.config/JetBrains │ ✅ Mounted │ 45 │
|
|
395
|
+
# └─────────────────────────┴──────────────┴────────┘
|
|
396
|
+
# 12/14 mounts active
|
|
397
|
+
# 🏥 Health Check Status: OK
|
|
398
|
+
|
|
399
|
+
# Trigger full health check
|
|
293
400
|
clonebox status . --user --health
|
|
294
401
|
|
|
295
|
-
#
|
|
296
|
-
#
|
|
402
|
+
# If mounts are missing, remount or rebuild:
|
|
403
|
+
# In VM: sudo mount -a
|
|
404
|
+
# Or rebuild: clonebox clone . --user --run --replace
|
|
297
405
|
```
|
|
298
406
|
|
|
299
407
|
### Export/Import Workflow
|
|
@@ -590,8 +698,10 @@ clonebox clone . --network auto
|
|
|
590
698
|
| `clonebox detect --yaml` | Output as YAML config |
|
|
591
699
|
| `clonebox detect --yaml --dedupe` | YAML with duplicates removed |
|
|
592
700
|
| `clonebox detect --json` | Output as JSON |
|
|
593
|
-
| `clonebox status . --user` | Check VM health, cloud-init
|
|
594
|
-
| `clonebox
|
|
701
|
+
| `clonebox status . --user` | Check VM health, cloud-init, IP, and mount status |
|
|
702
|
+
| `clonebox status . --user --health` | Check VM status and run full health check |
|
|
703
|
+
| `clonebox test . --user` | Test VM configuration (basic checks) |
|
|
704
|
+
| `clonebox test . --user --validate` | Full validation: mounts, packages, services vs YAML |
|
|
595
705
|
| `clonebox export . --user` | Export VM for migration to another workstation |
|
|
596
706
|
| `clonebox export . --user --include-data` | Export VM with browser profiles and configs |
|
|
597
707
|
| `clonebox import archive.tar.gz --user` | Import VM from export archive |
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
# CloneBox 📦
|
|
2
|
+
|
|
3
|
+
[](https://github.com/wronai/clonebox/actions)
|
|
4
|
+
[](https://pypi.org/project/clonebox/)
|
|
5
|
+
[](https://www.python.org/downloads/)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
|
|
2
8
|

|
|
3
9
|
|
|
4
10
|
```commandline
|
|
@@ -12,7 +18,8 @@
|
|
|
12
18
|
║ Clone your workstation to an isolated VM ║
|
|
13
19
|
╚═══════════════════════════════════════════════════════╝
|
|
14
20
|
```
|
|
15
|
-
|
|
21
|
+
|
|
22
|
+
> **Clone your workstation environment to an isolated VM in 60 seconds using bind mounts instead of disk cloning.**
|
|
16
23
|
|
|
17
24
|
CloneBox lets you create isolated virtual machines with only the applications, directories and services you need - using bind mounts instead of full disk cloning. Perfect for development, testing, or creating reproducible environments.
|
|
18
25
|
|
|
@@ -129,6 +136,61 @@ clonebox stop <name> # Zatrzymaj VM
|
|
|
129
136
|
clonebox delete <name> # Usuń VM
|
|
130
137
|
```
|
|
131
138
|
|
|
139
|
+
## Development and Testing
|
|
140
|
+
|
|
141
|
+
### Running Tests
|
|
142
|
+
|
|
143
|
+
CloneBox has comprehensive test coverage with unit tests and end-to-end tests:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Run unit tests only (fast, no libvirt required)
|
|
147
|
+
make test
|
|
148
|
+
|
|
149
|
+
# Run fast unit tests (excludes slow tests)
|
|
150
|
+
make test-unit
|
|
151
|
+
|
|
152
|
+
# Run end-to-end tests (requires libvirt/KVM)
|
|
153
|
+
make test-e2e
|
|
154
|
+
|
|
155
|
+
# Run all tests including e2e
|
|
156
|
+
make test-all
|
|
157
|
+
|
|
158
|
+
# Run tests with coverage
|
|
159
|
+
make test-cov
|
|
160
|
+
|
|
161
|
+
# Run tests with verbose output
|
|
162
|
+
make test-verbose
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Test Categories
|
|
166
|
+
|
|
167
|
+
Tests are organized with pytest markers:
|
|
168
|
+
|
|
169
|
+
- **Unit tests**: Fast tests that mock libvirt/system calls (default)
|
|
170
|
+
- **E2E tests**: End-to-end tests requiring actual VM creation (marked with `@pytest.mark.e2e`)
|
|
171
|
+
- **Slow tests**: Tests that take longer to run (marked with `@pytest.mark.slow`)
|
|
172
|
+
|
|
173
|
+
E2E tests are automatically skipped when:
|
|
174
|
+
- libvirt is not installed
|
|
175
|
+
- `/dev/kvm` is not available
|
|
176
|
+
- Running in CI environment (`CI=true` or `GITHUB_ACTIONS=true`)
|
|
177
|
+
|
|
178
|
+
### Manual Test Execution
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
# Run only unit tests (exclude e2e)
|
|
182
|
+
pytest tests/ -m "not e2e"
|
|
183
|
+
|
|
184
|
+
# Run only e2e tests
|
|
185
|
+
pytest tests/e2e/ -m "e2e" -v
|
|
186
|
+
|
|
187
|
+
# Run specific test file
|
|
188
|
+
pytest tests/test_cloner.py -v
|
|
189
|
+
|
|
190
|
+
# Run with coverage
|
|
191
|
+
pytest tests/ -m "not e2e" --cov=clonebox --cov-report=html
|
|
192
|
+
```
|
|
193
|
+
|
|
132
194
|
## Quick Start
|
|
133
195
|
|
|
134
196
|
### Interactive Mode (Recommended)
|
|
@@ -219,42 +281,82 @@ ls ~/.mozilla/firefox # Firefox profile
|
|
|
219
281
|
ls ~/.config/JetBrains # PyCharm settings
|
|
220
282
|
```
|
|
221
283
|
|
|
222
|
-
### Testing VM Configuration
|
|
284
|
+
### Testing and Validating VM Configuration
|
|
223
285
|
|
|
224
286
|
```bash
|
|
225
287
|
# Quick test - basic checks
|
|
226
288
|
clonebox test . --user --quick
|
|
227
289
|
|
|
228
|
-
# Full
|
|
229
|
-
clonebox test . --user --
|
|
230
|
-
|
|
231
|
-
#
|
|
232
|
-
# ✅
|
|
233
|
-
# ✅
|
|
234
|
-
# ✅
|
|
235
|
-
# ✅
|
|
236
|
-
# ✅
|
|
237
|
-
# ✅
|
|
290
|
+
# Full validation - checks EVERYTHING against YAML config
|
|
291
|
+
clonebox test . --user --validate
|
|
292
|
+
|
|
293
|
+
# Validation checks:
|
|
294
|
+
# ✅ All mount points (paths + app_data_paths) are mounted and accessible
|
|
295
|
+
# ✅ All APT packages are installed
|
|
296
|
+
# ✅ All snap packages are installed
|
|
297
|
+
# ✅ All services are enabled and running
|
|
298
|
+
# ✅ Reports file counts for each mount
|
|
299
|
+
# ✅ Shows package versions
|
|
300
|
+
# ✅ Comprehensive summary table
|
|
301
|
+
|
|
302
|
+
# Example output:
|
|
303
|
+
# 💾 Validating Mount Points...
|
|
304
|
+
# ┌─────────────────────────┬─────────┬────────────┬────────┐
|
|
305
|
+
# │ Guest Path │ Mounted │ Accessible │ Files │
|
|
306
|
+
# ├─────────────────────────┼─────────┼────────────┼────────┤
|
|
307
|
+
# │ /home/ubuntu/Downloads │ ✅ │ ✅ │ 199 │
|
|
308
|
+
# │ ~/.config/JetBrains │ ✅ │ ✅ │ 45 │
|
|
309
|
+
# └─────────────────────────┴─────────┴────────────┴────────┘
|
|
310
|
+
# 12/14 mounts working
|
|
311
|
+
#
|
|
312
|
+
# 📦 Validating APT Packages...
|
|
313
|
+
# ┌─────────────────┬──────────────┬────────────┐
|
|
314
|
+
# │ Package │ Status │ Version │
|
|
315
|
+
# ├─────────────────┼──────────────┼────────────┤
|
|
316
|
+
# │ firefox │ ✅ Installed │ 122.0+b... │
|
|
317
|
+
# │ docker.io │ ✅ Installed │ 24.0.7-... │
|
|
318
|
+
# └─────────────────┴──────────────┴────────────┘
|
|
319
|
+
# 8/8 packages installed
|
|
320
|
+
#
|
|
321
|
+
# 📊 Validation Summary
|
|
322
|
+
# ┌────────────────┬────────┬────────┬───────┐
|
|
323
|
+
# │ Category │ Passed │ Failed │ Total │
|
|
324
|
+
# ├────────────────┼────────┼────────┼───────┤
|
|
325
|
+
# │ Mounts │ 12 │ 2 │ 14 │
|
|
326
|
+
# │ APT Packages │ 8 │ 0 │ 8 │
|
|
327
|
+
# │ Snap Packages │ 2 │ 0 │ 2 │
|
|
328
|
+
# │ Services │ 5 │ 1 │ 6 │
|
|
329
|
+
# │ TOTAL │ 27 │ 3 │ 30 │
|
|
330
|
+
# └────────────────┴────────┴────────┴───────┘
|
|
238
331
|
```
|
|
239
332
|
|
|
240
|
-
### VM Health Monitoring
|
|
333
|
+
### VM Health Monitoring and Mount Validation
|
|
241
334
|
|
|
242
335
|
```bash
|
|
243
|
-
# Check overall status
|
|
336
|
+
# Check overall status including mount validation
|
|
244
337
|
clonebox status . --user
|
|
245
338
|
|
|
246
|
-
# Output:
|
|
247
|
-
# 📊
|
|
248
|
-
#
|
|
249
|
-
#
|
|
250
|
-
#
|
|
251
|
-
#
|
|
252
|
-
|
|
253
|
-
#
|
|
339
|
+
# Output shows:
|
|
340
|
+
# 📊 VM State: running
|
|
341
|
+
# 🔍 Network and IP address
|
|
342
|
+
# ☁️ Cloud-init: Complete
|
|
343
|
+
# 💾 Mount Points status table:
|
|
344
|
+
# ┌─────────────────────────┬──────────────┬────────┐
|
|
345
|
+
# │ Guest Path │ Status │ Files │
|
|
346
|
+
# ├─────────────────────────┼──────────────┼────────┤
|
|
347
|
+
# │ /home/ubuntu/Downloads │ ✅ Mounted │ 199 │
|
|
348
|
+
# │ /home/ubuntu/Documents │ ❌ Not mounted│ ? │
|
|
349
|
+
# │ ~/.config/JetBrains │ ✅ Mounted │ 45 │
|
|
350
|
+
# └─────────────────────────┴──────────────┴────────┘
|
|
351
|
+
# 12/14 mounts active
|
|
352
|
+
# 🏥 Health Check Status: OK
|
|
353
|
+
|
|
354
|
+
# Trigger full health check
|
|
254
355
|
clonebox status . --user --health
|
|
255
356
|
|
|
256
|
-
#
|
|
257
|
-
#
|
|
357
|
+
# If mounts are missing, remount or rebuild:
|
|
358
|
+
# In VM: sudo mount -a
|
|
359
|
+
# Or rebuild: clonebox clone . --user --run --replace
|
|
258
360
|
```
|
|
259
361
|
|
|
260
362
|
### Export/Import Workflow
|
|
@@ -551,8 +653,10 @@ clonebox clone . --network auto
|
|
|
551
653
|
| `clonebox detect --yaml` | Output as YAML config |
|
|
552
654
|
| `clonebox detect --yaml --dedupe` | YAML with duplicates removed |
|
|
553
655
|
| `clonebox detect --json` | Output as JSON |
|
|
554
|
-
| `clonebox status . --user` | Check VM health, cloud-init
|
|
555
|
-
| `clonebox
|
|
656
|
+
| `clonebox status . --user` | Check VM health, cloud-init, IP, and mount status |
|
|
657
|
+
| `clonebox status . --user --health` | Check VM status and run full health check |
|
|
658
|
+
| `clonebox test . --user` | Test VM configuration (basic checks) |
|
|
659
|
+
| `clonebox test . --user --validate` | Full validation: mounts, packages, services vs YAML |
|
|
556
660
|
| `clonebox export . --user` | Export VM for migration to another workstation |
|
|
557
661
|
| `clonebox export . --user --include-data` | Export VM with browser profiles and configs |
|
|
558
662
|
| `clonebox import archive.tar.gz --user` | Import VM from export archive |
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "clonebox"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.15"
|
|
8
8
|
description = "Clone your workstation environment to an isolated VM with selective apps, paths and services"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Apache-2.0"}
|
|
@@ -36,6 +36,7 @@ dependencies = [
|
|
|
36
36
|
"questionary>=2.0.0",
|
|
37
37
|
"psutil>=5.9.0",
|
|
38
38
|
"pyyaml>=6.0",
|
|
39
|
+
"pydantic>=2.0.0",
|
|
39
40
|
]
|
|
40
41
|
|
|
41
42
|
[project.optional-dependencies]
|
|
@@ -44,6 +45,12 @@ dev = [
|
|
|
44
45
|
"pytest-cov>=4.0.0",
|
|
45
46
|
"black>=23.0.0",
|
|
46
47
|
"ruff>=0.1.0",
|
|
48
|
+
"mypy>=1.0.0",
|
|
49
|
+
]
|
|
50
|
+
test = [
|
|
51
|
+
"pytest>=7.0.0",
|
|
52
|
+
"pytest-cov>=4.0.0",
|
|
53
|
+
"pytest-timeout>=2.0.0",
|
|
47
54
|
]
|
|
48
55
|
|
|
49
56
|
[project.scripts]
|
|
@@ -64,3 +71,31 @@ target-version = ["py38", "py39", "py310", "py311", "py312"]
|
|
|
64
71
|
[tool.ruff]
|
|
65
72
|
line-length = 100
|
|
66
73
|
select = ["E", "F", "W", "I", "N", "UP", "B", "C4"]
|
|
74
|
+
|
|
75
|
+
[tool.pytest.ini_options]
|
|
76
|
+
minversion = "7.0"
|
|
77
|
+
testpaths = ["tests"]
|
|
78
|
+
python_files = ["test_*.py"]
|
|
79
|
+
python_classes = ["Test*"]
|
|
80
|
+
python_functions = ["test_*"]
|
|
81
|
+
markers = [
|
|
82
|
+
"e2e: end-to-end tests requiring libvirt/KVM (deselect with '-m \"not e2e\"')",
|
|
83
|
+
"slow: slow tests (deselect with '-m \"not slow\"')",
|
|
84
|
+
"integration: integration tests",
|
|
85
|
+
"requires_kvm: tests requiring /dev/kvm access",
|
|
86
|
+
]
|
|
87
|
+
addopts = [
|
|
88
|
+
"-ra",
|
|
89
|
+
"--strict-markers",
|
|
90
|
+
"--strict-config",
|
|
91
|
+
"--showlocals",
|
|
92
|
+
"--cov=src/clonebox",
|
|
93
|
+
"--cov-report=term-missing",
|
|
94
|
+
"--cov-fail-under=30",
|
|
95
|
+
]
|
|
96
|
+
filterwarnings = [
|
|
97
|
+
"error",
|
|
98
|
+
"ignore::DeprecationWarning",
|
|
99
|
+
"ignore::PendingDeprecationWarning",
|
|
100
|
+
"ignore::UserWarning",
|
|
101
|
+
]
|