12 - b2conditionsdb iov --run-range
14 - b2conditionsdb diff --run-range
15 - b2conditionsdb legacydownload --run-range
16 - b2conditionsdb iovs delete --run-range
17 - b2conditionsdb iovs delete --run-range --fully-contained
18 - b2conditionsdb iovs copy --replace
26import b2test_utils
as b2tu
29def call_command(command):
30 """Call command print output after having removed some lines from output
33 command (string): command to be called
35 output = subprocess.check_output(shlex.split(command), encoding=
'utf-8').strip().split(
'\n')
37 if "created" not in line
and "modified" not in line:
41if __name__ ==
'__main__':
43 if b2tu.is_cdb_down():
44 b2tu.skip_test(
'Test currently disabled due to CDB troubles')
46 tags = [
'main_tag_merge_test_1',
'main_tag_merge_test_2',
'main_tag_merge_test_3']
48 call_command(
'b2conditionsdb iov main_tag_merge_test_2')
49 call_command(
'b2conditionsdb iov main_tag_merge_test_2 --run-range 5 200 5 300')
50 call_command(
'b2conditionsdb diff main_tag_merge_test_2 main_tag_merge_test_3')
51 call_command(
'b2conditionsdb diff main_tag_merge_test_2 main_tag_merge_test_3 --run-range 5 200 5 300')
55 with tempfile.TemporaryDirectory()
as tmpdirname:
56 output = subprocess.check_output(
57 shlex.split(f
'b2conditionsdb legacydownload -c main_tag_merge_test_3 {tmpdirname} --run-range 5 0 5 1000'),
58 encoding=
'utf-8').strip().split(
'\n')
60 print(line.replace(tmpdirname,
"centraldb")[7:].strip())
62 call_command(
'b2conditionsdb iovs delete --dry-run main_tag_merge_test_2 --run-range 5 200 5 300')
63 call_command(
'b2conditionsdb iovs delete --dry-run main_tag_merge_test_2 --run-range 5 200 5 300 --fully-contained')
64 call_command(
'b2conditionsdb iovs copy --replace --dry-run main_tag_merge_test_2 main_tag_merge_test_1')