Skip to content

Commit afec6b2

Browse files
committed
assert previous bi
1 parent 48123aa commit afec6b2

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

tests/test_artifactory_commands.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -716,16 +716,20 @@ def test_append_local_build_info(upload_bi, bi_append_flag):
716716
run("conan create . --format json -s build_type=Release > create_release.json")
717717
run("conan upload mypkg/1.0 -c -r extensions-stg")
718718
run(f"conan art:build-info create create_release.json {build_name}_release {build_number} extensions-stg > {build_name}_release.json")
719+
bi_data = json.loads(load(f"{build_name}_release.json"))
720+
assert len(bi_data["modules"]) == 2
719721

720722
# Create debug packages & build info
721723
run("conan create . --format json -s build_type=Debug > create_debug.json")
722724
run("conan upload mypkg/1.0 -c -r extensions-stg")
723725
run(f"conan art:build-info create create_debug.json {build_name}_debug {build_number} extensions-stg > {build_name}_debug.json")
726+
bi_data = json.loads(load(f"{build_name}_debug.json"))
727+
assert len(bi_data["modules"]) == 2
724728

725-
# Aggregate the release and debug build infos into a new one to later do the promotion
726-
run(f"conan art:build-info append {build_name} {build_number} --build-info-file={build_name}_release.json "
727-
f"--build-info-file={build_name}_debug.json > {build_name}_aggregated.json")
728-
bi_data = json.loads(load(f"{build_name}_aggregated.json"))
729+
# Aggregate the release and debug build infos into a new one
730+
output = run(f"conan art:build-info append {build_name} {build_number} --build-info-file={build_name}_release.json "
731+
f"--build-info-file={build_name}_debug.json")
732+
bi_data = json.loads(output)
729733

730734
assert bi_data["name"] == build_name
731735
assert bi_data["number"] == build_number

0 commit comments

Comments
 (0)