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

feat: unsupported platform warning #437

Merged

Conversation

mtache
Copy link
Collaborator

@mtache mtache commented Oct 25, 2023

Description

If a command defined in a specific test returns the "not supported on this hardware platform" error, the test will be skipped (instead of being in error) and a clear warning will request the user to open a GitHub issue because the test needs to be skipped on specific hardware platform but this has not been implemented.

Example:

WARNING  [anta.tests.hardware.VerifyAdverseDrops] Test VerifyAdverseDrops has been skipped because it is not supported on cEOSLab, please open a GitHub issue.

Changes:

  • Introduce supports() method for AntaDevice.

Fixes #335
Fixes #421

Checklist:

@mtache mtache requested review from carl-baillargeon and gmuloc and removed request for carl-baillargeon October 25, 2023 17:17
@mtache mtache changed the title feat/warning unsupported platform feat: unsupported platform warning Oct 25, 2023
@gmuloc gmuloc added this to the v0.11.0 milestone Oct 26, 2023
anta/device.py Outdated Show resolved Hide resolved
anta/device.py Outdated Show resolved Hide resolved
anta/device.py Outdated Show resolved Hide resolved
anta/device.py Outdated Show resolved Hide resolved
anta/device.py Outdated Show resolved Hide resolved
anta/device.py Outdated Show resolved Hide resolved
anta/device.py Outdated Show resolved Hide resolved
tests/units/test_device.py Outdated Show resolved Hide resolved
tests/units/test_models.py Show resolved Hide resolved
@gmuloc gmuloc modified the milestones: v0.11.0, v1.0.0 Nov 13, 2023
@mtache mtache force-pushed the feat/warning-unsupported-platform branch from 3e7e64f to 8e2c661 Compare November 21, 2023 12:05
tests/lib/fixture.py Outdated Show resolved Hide resolved
tests/units/test_device.py Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
anta/models.py Outdated Show resolved Hide resolved
@mtache mtache force-pushed the feat/warning-unsupported-platform branch from b14e921 to 552c60e Compare November 22, 2023 14:08
@mtache mtache linked an issue Nov 22, 2023 that may be closed by this pull request
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

tests/units/test_device.py Outdated Show resolved Hide resolved
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Collaborator

@gmuloc gmuloc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚢
:shipit:

@gmuloc gmuloc merged commit 3cb44ee into arista-netdevops-community:main Nov 24, 2023
19 checks passed
@mtache mtache deleted the feat/warning-unsupported-platform branch November 24, 2023 10:05
@titom73 titom73 mentioned this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Exception object not present in TestResult Better handling of unsupported commands
2 participants