Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/allocator_test.py AllocatorTest::test_delegation_not_subnetFAILED #205

Open
Tracked by #198
zeromind opened this issue Feb 8, 2022 · 0 comments
Open
Tracked by #198

Comments

@zeromind
Copy link
Collaborator

zeromind commented Feb 8, 2022

FAILED tests/allocator_test.py::AllocatorTest::test_delegation_not_subnet - sqlalchemy.exc.IntegrityError: (MySQLdb._exceptions.IntegrityError) (1062, "Duplicate entry '83076749736557242056487941267521536-64-384' for key 'address'")

ndcli pool <pool> get delegation currently does not catch when the user tries to get a delegation with the same size as the pool's subnet, it fails in the DB due to a unique constraint:

ndcli modify pool pool get delegation 64
ERROR - (MySQLdb._exceptions.IntegrityError) (1062, "Duplicate entry '83076749736557242056487941267521536-64-941' for key 'address'")
[SQL: INSERT INTO ipblock (created, created_by, modified, modified_by, version, address, prefix, priority, gateway, parent_id, status_id, ippool_id, vlan_id, layer3domain_id) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)]
[parameters: (datetime.datetime(2022, 2, 8, 15, 51, 40, 633610), 'admin', datetime.datetime(2022, 2, 8, 15, 51, 40, 633628), 'admin', 6, 83076749736557242056487941267521536, 64, None, None, None, 7520, None, None, 941)]
(Background on this error at: https://sqlalche.me/e/14/gkpj)

Test:
https://github.com/1and1/dim/blob/0e951965b65007c3ecbfcc15e6544ccfc635b9a7/dim-testsuite/tests/allocator_test.py#L150-L156

@zeromind zeromind mentioned this issue Feb 8, 2022
10 tasks
@zeromind zeromind changed the title tests/allocator_test.py AllocatorTest::test_delegation_not_subnetFAILED tests/allocator_test.py::AllocatorTest::test_delegation_not_subnet - sqlalchemy.exc.IntegrityError: (MySQLdb._exceptions.IntegrityError) (1062, "Duplicate entry '83076749736557242056487941267521536-64-384' for key 'address'") tests/allocator_test.py AllocatorTest::test_delegation_not_subnetFAILED Feb 8, 2022
zeromind added a commit to zeromind/dim that referenced this issue Mar 18, 2022
mark error tracked in ionos-cloud#205 as known failure,
this allows us to check for passing pytest,
in e.g. actions
zeromind added a commit to zeromind/dim that referenced this issue Mar 18, 2022
mark error tracked in ionos-cloud#205 as known failure,
this allows us to check for passing pytest,
in e.g. actions

see https://docs.pytest.org/en/7.1.x/how-to/skipping.html

also bump pytest, and remove dependency on click in dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant