Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

[1LP][RFR] No more session fixtures #9639

Merged
merged 9 commits into from
Nov 20, 2019

Conversation

izapolsk
Copy link
Contributor

@izapolsk izapolsk commented Nov 18, 2019

there is a plan to implement appliance markers and generate appliances based on those markers.
We should get rid of session scoped fixuters using appliance fixture. This PR is one of steps we have to undertake to achieve above.

based on #9638

@izapolsk izapolsk force-pushed the no-more-session-fixtures branch from 1783bff to d78ce6e Compare November 18, 2019 16:07
@dajoRH dajoRH added lint-ok and removed needs-lint labels Nov 18, 2019
@izapolsk izapolsk force-pushed the no-more-session-fixtures branch 2 times, most recently from ace6908 to fc49e8e Compare November 18, 2019 19:02
@izapolsk izapolsk changed the title [WIPTEST] No more session fixtures [RFR] No more session fixtures Nov 18, 2019
@izapolsk izapolsk force-pushed the no-more-session-fixtures branch from 83ecf60 to 7b07109 Compare November 19, 2019 11:46
@izapolsk izapolsk changed the title [RFR] No more session fixtures [WIP] No more session fixtures Nov 19, 2019
@izapolsk izapolsk force-pushed the no-more-session-fixtures branch from 85cd96c to 69fb25b Compare November 19, 2019 15:40
@izapolsk izapolsk force-pushed the no-more-session-fixtures branch from 5fc5269 to 6e715b9 Compare November 19, 2019 17:50
@izapolsk izapolsk changed the title [WIP] No more session fixtures [RFR] No more session fixtures Nov 19, 2019
@izapolsk izapolsk force-pushed the no-more-session-fixtures branch from 6e715b9 to 308fb1a Compare November 19, 2019 19:12
@@ -4,5 +4,5 @@


@pytest.fixture(scope="session")
Copy link
Contributor

Choose a reason for hiding this comment

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

is this suppose to be session still?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. I have to get rid of session scoped fixtures which use appliance. the rest can be left as is.

Copy link
Contributor

@jawatts jawatts left a comment

Choose a reason for hiding this comment

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

Looks good, one comment

@jawatts jawatts changed the title [RFR] No more session fixtures [1LP][RFR] No more session fixtures Nov 20, 2019
@mshriver mshriver self-assigned this Nov 20, 2019
@@ -4,5 +4,5 @@


@pytest.fixture(scope="session")
def cfme_data(request):
def cfme_data():
Copy link
Member

Choose a reason for hiding this comment

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

Wow, I don't think we're actually using this anywhere.

logger.info("Pushed appliance {} on stack (was {} before) ".format(
obj.hostname, was_before.hostname if was_before else 'empty'))
logger.info(f"Pushed appliance {obj.hostname} on stack "
f"(was {was_before.hostname if was_before else 'empty'} before)")
Copy link
Member

Choose a reason for hiding this comment

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

Almost breaking your own rules for f-strings ;)

@mshriver mshriver merged commit c580686 into ManageIQ:master Nov 20, 2019
spusateri pushed a commit to spusateri/integration_tests that referenced this pull request Jan 27, 2020
there is a plan to implement appliance markers and generate appliances based on those markers.
We should get rid of session scoped fixuters using appliance fixture. This PR is one of steps we have to undertake to achieve above.

Adding hook registering and calling for the appliance stack, in order to call methods on appliances, whenever they're used for tests. Replaces previous session scoped fixtures that were modifying the appliance at the start of the session.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants