fix: advance TCS root only for numbered-source changes
This commit is contained in:
parent
72fa92962f
commit
4a030c15ab
5 changed files with 21 additions and 6 deletions
|
|
@ -53,6 +53,16 @@ class RootAgentTest(unittest.TestCase):
|
|||
MODULE.refresh(ROOT, output, pointer, 'negative-test')
|
||||
self.assertEqual(current.read_bytes(), before)
|
||||
|
||||
def test_ordinary_commit_equivalent_sources_do_not_advance_current(self):
|
||||
with tempfile.TemporaryDirectory() as temp:
|
||||
base = Path(temp)
|
||||
output, pointer = base / 'state', base / 'TCS-ROOT.json'
|
||||
first = MODULE.refresh(ROOT, output, pointer, 'test')
|
||||
current = json.loads((output / 'CURRENT.json').read_text())
|
||||
same = MODULE.refresh(ROOT, output, pointer, 'ordinary-commit-test')
|
||||
self.assertIn(same['state'], ['CURRENT_IDEMPOTENT', 'CURRENT_NUMBER_NAV_UNCHANGED'])
|
||||
self.assertEqual(json.loads((output / 'CURRENT.json').read_text())['freshness_token'], current['freshness_token'])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Reference in a new issue