fix: reject native source renames before management writes
This commit is contained in:
1 parent
36ff964230
commit
d40fa3a750
7 files changed
+102
-20
No files matched your search
@@ -18,7 +18,7 @@ def transaction(tmp_path, monkeypatch):
|
||||
library = root/'native-add/fixture/mentor_lib.lmc'
|
||||
library.parent.mkdir(parents=True); library.write_bytes(b'fixture library')
|
||||
(root/'probe-owner.json').write_text(json.dumps({'library': str(library), 'token': 'owned'}), encoding='utf-8')
|
||||
source = project(tmp_path/'source')
|
||||
source = project(tmp_path/'source', 'Block')
|
||||
for path in (source, source.parent/'PCB/pcb.prj'):
|
||||
with path.open('a') as stream: stream.write(f'KEY CentralLibrary "{library}"\n')
|
||||
state = {'entries': [], 'calls': [], 'corrupt': False, 'fail_add': False}
|
||||
@@ -80,7 +80,7 @@ def test_owned_fixture_engine_add_conflict_update_remove_and_identity(transactio
|
||||
root, request, state = transaction
|
||||
original = request.source.read_bytes()
|
||||
assert execute(root, request).status == 'UPLOADED'
|
||||
registered = request.library.parent/'ReusableBlocksLP/Block/Work/Source.prj'
|
||||
registered = request.library.parent/'ReusableBlocksLP/Block/Work/Block.prj'
|
||||
assert project_library(registered) == request.library.resolve()
|
||||
calls = len(state['calls'])
|
||||
assert execute(root, request).status == 'UPLOAD_FAILED'
|
||||
|
||||
Reference in new issue
Block a user