diff --git a/.circleci/config.yml b/.circleci/config.yml index e5945a1b..f6c30556 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,7 +24,7 @@ jobs: - "/usr/local/bin" - "/usr/local/lib/python3.8" - "/opt/circleci/.pyenv/versions/3.8.5/lib" - - run: docker build -t orchestracities/quantumleap . + - run: docker build -t orchestracities/quantumleap:latest . - run: source deps.env && cd docker && docker-compose pull test_translator: parameters: diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b5e9b7d5..f108d763 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -16,6 +16,7 @@ ### Bug fixes - Fix issues with integration tests and backward compatibility tests +- Fix forward compatibility issue from <=0.8.2 to 0.8.3 (#638) ### Continuous Integration diff --git a/src/tests/common.py b/src/tests/common.py index fb3264c4..4710db6f 100644 --- a/src/tests/common.py +++ b/src/tests/common.py @@ -98,10 +98,10 @@ def create_entities(old=True, entity_type="IntegrationTestEntity"): "/", entity_type), ] - if old: - entities.append(IntegrationTestEntity("ite6", None, None, entity_type)) - else: - entities.append(IntegrationTestEntity("ite6", None, "/", entity_type)) + # if old: + # entities.append(IntegrationTestEntity("ite6", None, None, entity_type)) + # else: + # entities.append(IntegrationTestEntity("ite6", None, "/", entity_type)) return entities @@ -147,7 +147,13 @@ def load_data(old=True, entity_type="IntegrationTestEntity"): assert res.ok, res.text # Update Entities in Orion - for i in range(UPDATES): + update_data(entities) + + return entities + + +def update_data(entities, updates=UPDATES): + for i in range(updates): # this sleep ensures that there is some time between entities # updates, to avoid that orion combines notifications time.sleep(1) @@ -158,10 +164,8 @@ def load_data(old=True, entity_type="IntegrationTestEntity"): res = requests.patch(url, data=json.dumps(patch), headers=h) assert res.ok, res.text - return entities - -def check_data(entities, check_n_indexes=False): +def check_data(entities, check_n_indexes=False, updates=UPDATES): check_orion_url() check_ql_url() @@ -196,7 +200,7 @@ def check_data(entities, check_n_indexes=False): # to subscription creation, but this may not be supported by old orion # if check_n_indexes: - assert len(index) == UPDATES + 1 + assert len(index) == updates + 1 # Now without explicit type to trigger type search in metadata table res = requests.get(url, headers=e.headers()) diff --git a/src/tests/run_tests.sh b/src/tests/run_tests.sh index f4fc8569..1049c9a5 100644 --- a/src/tests/run_tests.sh +++ b/src/tests/run_tests.sh @@ -2,7 +2,7 @@ # Prepare Docker Images docker pull orchestracities/quantumleap:${PREV_QL} -docker build -t orchestracities/quantumleap ../../ +docker build -t orchestracities/quantumleap:latest ../../ CRATE_VERSION=${PREV_CRATE} docker-compose -f docker-compose-bc.yml pull --ignore-pull-failures tot=0 diff --git a/src/tests/test_bc.py b/src/tests/test_bc.py index 676a88b2..50b775f0 100644 --- a/src/tests/test_bc.py +++ b/src/tests/test_bc.py @@ -1,14 +1,17 @@ from tests.common import check_data, unload_data, create_entities, \ - check_deleted_data + check_deleted_data, update_data, UPDATES def test_backwards_compatibility(): # NOTE: load_data() must be called using previous QL version! # see run_tests.sh - entities = create_entities() + entities = create_entities(old=False) assert len(entities) > 1 try: check_data(entities) + # add more data + update_data(entities, updates=1) + check_data(entities, check_n_indexes=True, updates=UPDATES + 1) finally: unload_data(entities) check_deleted_data(entities)