Skip to content

[sonic-utilities] AAA unit tests do not handle mock DB connection correctly #21871

@anders-nexthop

Description

@anders-nexthop

Many test cases in sonic-utilities/tests/aaa_test.py and sonic-utilities/tests/radius_test.py are handling mock database connections incorrectly. The state configured by AAA config commands is not the same state used by the AAA show commands that are being used as validation. Instead, desired state is manually fed into AAA show commands to produce the desired results. This is a clear break from the prevalent pattern in sonic-utilities/tests in which config commands are verified with their accompanying show commands.

This is a duplicate of sonic-net/sonic-utilities/issues/3754 which I am raising here to get better visibility. Please see that issue for further details.

A fix is proposed here.

Metadata

Metadata

Labels

Triagedthis issue has been triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions