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

Reset dersired state after each test #200

Merged
merged 1 commit into from
Oct 3, 2019

Conversation

qinqon
Copy link
Member

@qinqon qinqon commented Oct 2, 2019

No description provided.

@qinqon qinqon requested review from phoracek and SchSeba October 2, 2019 13:59
@@ -215,6 +219,7 @@ var _ = Describe("NodeNetworkState", func() {
for _, node := range nodes {
interfacesNameForNode(node).ShouldNot(ContainElement("bond1"))
}
resetDesiredStateForNodes()
Copy link
Member

Choose a reason for hiding this comment

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

Can't we do it in module-wide (or even better, package-wide) AfterEach?

Copy link
Member Author

Choose a reason for hiding this comment

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

well we don't control what afterEach come last..., prefer to do this way to be sure that this is the last thing is called.

Copy link
Member

Choose a reason for hiding this comment

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

Fine with me. Would you just add a TODO to resetDesiredStateForNodes mentioning that we should drop it once Policy cleans up the state?

@phoracek
Copy link
Member

phoracek commented Oct 2, 2019

ci test please

1 similar comment
@phoracek
Copy link
Member

phoracek commented Oct 2, 2019

ci test please

@qinqon qinqon force-pushed the reset_dersired_state_after_each_test branch from 93ae284 to 7b68519 Compare October 3, 2019 08:18
…test

- We have the --no-commit at leftover from another PR that we split, so we have to remove it
- do desiredState cleanup at AfterEach
- Use unique name for bridge and bond per test so failures at tearDown does not affect the other tests

Signed-off-by: Quique Llorente <[email protected]>
@qinqon qinqon force-pushed the reset_dersired_state_after_each_test branch from 7b68519 to 893cbc6 Compare October 3, 2019 08:19
@qinqon qinqon merged commit 7e9fac8 into nmstate:master Oct 3, 2019
cybertron pushed a commit to cybertron/kubernetes-nmstate that referenced this pull request Jul 30, 2021
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.

2 participants