skytreader / chadow

A file back-up system for personal use
0 stars 0 forks source link

A storage medium path should be manageable from different installations #15

Open skytreader opened 1 year ago

skytreader commented 1 year ago

Try:

createlib library
regsector library flash
regmedia library flash /media/usr/LIBRARY

When that media path was indexed in a different installation already, it becomes impossible to manage it in a different installation.

Solution: When "installing" chadow, generate a UUID in the config (with uuidgen) then save this UUID in the metadata of the media path.

skytreader commented 1 year ago

Still failing one test in scheherazade:

$ python chadow_test.py RegMediaTests.test_regmedia_metadata_exists
INFO: asked to register media /media/testpath in sector sector1.
INFO: Registered media for library testlib at sector sector1 at path /media/testpath.
F
======================================================================
FAIL: test_regmedia_metadata_exists (__main__.RegMediaTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/unittest/mock.py", line 1191, in patched
    return func(*args, **keywargs)
  File "chadow_test.py", line 230, in test_regmedia_metadata_exists
    ExitCodes.STATE_CONFLICT.value
  File "chadow_test.py", line 48, in _verify_call
    self.assertEqual(result.exit_code, expected_return)
AssertionError: 0 != 103

----------------------------------------------------------------------
Ran 1 test in 0.015s

FAILED (failures=1)