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

test #23

Open
wants to merge 68 commits into
base: codecov
Choose a base branch
from
Open

test #23

wants to merge 68 commits into from

Conversation

richtja
Copy link
Owner

@richtja richtja commented Oct 9, 2024

No description provided.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (codecov@17201f1). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             codecov      #23   +/-   ##
==========================================
  Coverage           ?   54.47%           
==========================================
  Files              ?      202           
  Lines              ?    21874           
  Branches           ?        0           
==========================================
  Hits               ?    11916           
  Misses             ?     9958           
  Partials           ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

FarooqAbdulla02 and others added 26 commits October 14, 2024 17:40
when IP addresses are confiugred from a config file, the generic
"ip flush" command does not removes the IP address and IP's will
be remain intact.

when user wanted to remove all IP addresses of interface which user
doesnot aware of it, this code will helps to find all the assigned
IP addresses and removes it.

Signed-off-by: Shaik Abdulla <[email protected]>
Github is depracating the MacOS 12 runner and it will be removed
December 3rd. Let's do the update now to avoid any future trubles.

Reference: actions/runner-images#10721
Signed-off-by: Jan Richter <[email protected]>
…sh_ipaddr

Remove IPv4 Addresses of network interface.
For the sake of incorporating a fix on check-lint, where the return
code signals any failures in the executed checks, as opposed to just
the last check.

Signed-off-by: Cleber Rosa <[email protected]>
In order to have "avocado/utils" in a way that can be easily
transported to the autils project, it's necessary to have the closest
lint configuration possible (ideally, the same).

This introduces a configuration file that is a copy of the existing
".pylintrc" file.  The goal is that further commits will address other
warnings and bring the exceptions as close as possible to the
"avocado-static-checks" default pylint configuration file, which has
no exceptions.

Signed-off-by: Cleber Rosa <[email protected]>
For this change, there was the possibility of making changes
compatible with "logging-format-style=old" (the default), or jumping
the gun and making changes compatible with "logging-format-style=new".
The earlier approach was chosen because the goal is to get closer to:

* A default pylint configuration (as shipped/generated by pylint
  itself)
* The configuration provided by avocado-static-checks and used by
  autils

Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/logging-fstring-interpolation.html
Signed-off-by: Cleber Rosa <[email protected]>
The "broad-except" has been renamed to "broad-exception-caught",
warning number W0718.  So it can be removed from the configuration
file.

Reference: https://pylint.pycqa.org/en/latest/user_guide/messages/warning/broad-except.html
Signed-off-by: Cleber Rosa <[email protected]>
There are a few occurrences where code is being used to keep track of
possible improvements.  Many times these will go unnoticed for ages.

Let's either document the limitations that are affected by the
"TODO"s, or remove them because after quite some time, they were not
something that was attempted to be improved or fixed.

https://pylint.pycqa.org/en/latest/user_guide/messages/warning/fixme.html
Signed-off-by: Cleber Rosa <[email protected]>
…s_lint_warnings

Avocado utils lint warnings
Since codeclimate check hasn't been accurate and often creates false
positive, the positives of having such tool is much lower that the
negative impact on PRs. Therefore, this commit removes all occurrences
of codeclimate code from Avocado.

Signed-off-by: Jan Richter <[email protected]>
…nding

lint: fix one outstanding raise-missing-from / W0707
The current mock method on the two tests modified here do not support
the context manager pattern.  Let's use the standard library support
for mocking open that supports it.

This is needed for future lint check improvements that will enforce
the use of open() as a context manager to avoid leaking resources.

The test_set_idle_state_withsetstate() test has a significant change
of behavior: one io.BytesIO instance was used for the writes that, in
real life, would happen on two different files.  The proposed change
brings a more realistic, with a single write to a single
file (although it only checks half of the values now).  Still, I
believe this is an improvement, including the extra check for the file
that was actually written to.

Reference: https://docs.python.org/3/library/unittest.mock.html#mock-open
Signed-off-by: Cleber Rosa <[email protected]>
…ils_cpu_context_manager

selftests/unit/utils/cpu.py: support the context manager pattern
- Removed the unused variable `hint_resolutions` from the `resolve` function.
- Directly used the dictionary comprehension to populate `hint_references` from `hint.get_resolutions()`.
- Simplified the logic by eliminating an unnecessary intermediate variable.

Signed-off-by: lixu <[email protected]>
Update check_test docstring to clarify state parameter
Remove unused variable 'hint_resolutions'
The message given by the avocado-instrumented and python-unittest
resolvers, resolvers that share a lot of code and require Python
files, can be made clearer.

One of the earliest checks performed is about the file *name* and
its *suffix*, and not necessarily about an actual file (that exists).
Even though the concepts are pretty close, let's make it clear that
these resolvers are rejecting the references given based on the ".py"
suffix not existing in the file name, and not necessarily, at that
time, rejecting it based on an actual existing file.

Signed-off-by: Cleber Rosa <[email protected]>
This patch will make the links on the UI of the [Deployments](https://github.com/avocado-framework/avocado/deployments/pypi) and workflow pages more accurate.

Signed-Off-By: Sviatoslav Sydorenko <[email protected]>
clebergnu and others added 29 commits November 27, 2024 21:51
…m_build

selftests: drop job-api test variant that may exceed sqlite3's own limits
Updated the image pattern in FedoraSecondaryImageProvider to match
the available Fedora image file names for the s390x architecture.
This resolves the issue where the vmimage utility could not download
the correct image due to a pattern mismatch.

Reference: avocado-framework#6071
Signed-off-by: Harvey Lynden <[email protected]>
Fix: Handle missing job data in 'avocado jobs list' command
- Updated 'handle_list_command' to use `job.get()` for safely accessing job data.
- If a key is missing, it now defaults to '<unknown>' instead of causing a crash.
- Refactored some code due to codeclimate suggestion.

Reference:      avocado-framework#6067
Signed-off-by: Harvey Lynden <[email protected]>
Filtering now properly handles both verbose and non-verbose output modes
while checking for tag matches.
without changing the existing behavior that users expect when using
'avocado list -t <tag>'

Reference:      avocado-framework#6066
Signed-off-by: Harvey Lynden <[email protected]>
The resultsdb-api uses urllib as dependency. The urllib dropped support
for the python 3.8 in the version 2.3.0. Let's use older version of
urllib to keep python 3.8 support for resultsdb plugin.

Reference:
https://urllib3.readthedocs.io/en/stable/changelog.html#deprecations-and-removals
Signed-off-by: Jan Richter <[email protected]>
This commit introduces a new dependency runner called `pip`. With this
runner, avocado will be able to manipulate with python packages in test
environment based on the test dependency configuration. The runner will
install pip into the test environment, and then it can call `pip
install` or `pip uninstall` commands. For example, this feature can be
used for running `coverage.py` inside different environments than
process.

Signed-off-by: Jan Richter <[email protected]>
After the update in github CI runner the avocado install will fail with
`Cannot uninstall jsonschema 4.10.3, RECORD file not found. Hint: The
package was installed by debian.` This is caused by cached python
packages in the runner. Running the pip as stand alone app insted of
python module will fix this issue.

Reference:
https://github.com/actions/runner-images/releases/tag/ubuntu24%2F20250105.1
https://github.com/avocado-framework/avocado/actions/runs/12706808734/job/35421314652#step:3:93
Signed-off-by: Jan Richter <[email protected]>
In both the installation instructions, and in the release guide.

This reflects changes in distros and the availability of features such
as Fedora (and EPEL) modules.

Fixes: avocado-framework#6044
Reference: https://fedoraproject.org/wiki/Changes/RetireModularity
Signed-off-by: Cleber Rosa <[email protected]>
…elease

Use "avocado-latest-release" repository
Signed-off-by: Jan Richter <[email protected]>
The advanced search (which is enabled by default) supports negation
searches, matching multiple words regardless of order, and exact
matching using quotes.

The update focuses on just the datatables download but with included
bootstrap styling instead of a separate legacy datatables.bootstrap.js
file.

Signed-off-by: Plamen Dimitrov <[email protected]>
We have to query a new element id (dt-length-0 instead of results_length)
since the old one is no longer available and select/input elements
always have ID-s so they are more reliable across updates. We also
follow the approach in datatables to provide ID for the added status
select element and reuse the dt-search class for the new div element
with the only exception that we need extra right margin to distance
a colon appended "status" from the select element (only the input
element will inherit the right marging from dt-search).

Signed-off-by: Plamen Dimitrov <[email protected]>
We have to remove the static div elements in the HTML template because
datatables will include all of them in a span for the header cell
content, overwriting the original table structure, and must instead
perform our own overwriting afterwards. The div elements are added to
each table header cell if they are not already present to add them
just once for all table redraws.

If the div is instead wrapped in a span by datatables this will lead
to its dynamically calculated height to be added to ever increasing
table header cell height and degrade the table headers. The current
change achieves the same structure we had before but with multiple
spans (for content and for sorting arrows) now with datatables 2.

Signed-off-by: Plamen Dimitrov <[email protected]>
Signed-off-by: Jan Richter <[email protected]>
This adds support for testing the coverage of Avocado under Python 3.13, and advertises it as supporting it.

avocado-framework#6094
Signed-off-by: Harvey Lynden <[email protected]>
This commit changes the way how avocado instrumented runner handles test
timeouts.  For timeout handling, we used to use signals and raising
TestInterrupt error. Such solution has an issue that we can't control
where in the code the Error will be raised, and it can be handled before
it reaches the runner layer. More info about this issue in avocado-framework#6046.

This change removes the signal handling and uses threading instead. Now
each test method will be run in a separated thread and this thread will
be terminated if timeout is reached. This solution selves the raising
error issue and keeps the current test lifecycle untouched.

Reference: avocado-framework#6046
Signed-off-by: Jan Richter <[email protected]>
Signed-off-by: Jan Richter <[email protected]>
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

Successfully merging this pull request may close these issues.

7 participants