This repository was archived by the owner on Apr 7, 2022. It is now read-only.
[1LP][RFR] Chargeback resource allocation fixes#10183
Merged
jawatts merged 1 commit intoManageIQ:masterfrom Jun 19, 2020
tpapaioa:fix_chargeback_allocation
Merged
[1LP][RFR] Chargeback resource allocation fixes#10183jawatts merged 1 commit intoManageIQ:masterfrom tpapaioa:fix_chargeback_allocation
jawatts merged 1 commit intoManageIQ:masterfrom
tpapaioa:fix_chargeback_allocation
Conversation
Contributor
|
I detected some fixture changes in commit 1d9874e Show fixturesThe local fixture
The local fixture
The local fixture
The local fixture
The local fixture
The local fixture
The local fixture
The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
john-dupuy
approved these changes
Jun 17, 2020
Contributor
john-dupuy
left a comment
There was a problem hiding this comment.
LGTM, thanks for this PR @tpapaioa
jawatts
approved these changes
Jun 19, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes several changes to the resource allocation chargeback tests. Important changes of note:
chargeback_vmfixture to return the name of the chargeback VM from the provider data, instead of looking it up each time in the various fixtures / tests.pytest.yield_fixturedecorators withpytest.fixture.vim_performance_statestable before capturing metrics data. Failure to do so could result in metrics data with the wrong provider id (if the provider previously existed on the appliance with one id then was deleted and re-created prior to these tests running).None(i.e., no value exists for that column), then change it to zero before callingfloat(), to avoidTypeErrorexceptions.cfme/fixtures/so that they can be shared with other chargeback test modules.num_hours = 1. But if the VM already existed in the db and has a 'State Changed On' field earlier than that hourly rollup's timestamp, thennum_hoursshould be the number of hours since that time. If 'State Changed On' is earlier than the report time period (i.e., the beginning of the day), then the number of hours since midnight should instead be used.{{ pytest: -vv --use-provider complete --long-running cfme/tests/intelligence/chargeback/test_resource_allocation.py }}