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

Graph refresh specs #238

Merged
merged 4 commits into from
Nov 12, 2018
Merged

Graph refresh specs #238

merged 4 commits into from
Nov 12, 2018

Conversation

slemrmartin
Copy link
Contributor

Specs are created against old refresh, then values were checked against graph refresh

depends on: #236

@slemrmartin
Copy link
Contributor Author

Cc @Ladas @agrare @douglasgabriel
Check only last commit (needs rebase of #236 )

@slemrmartin
Copy link
Contributor Author

integrated #232 to graph refresh
@CharlleDaniel your PR contains some bug, when I run your (current) refresh against this extended refresher_spec, then value of Firmware.count differs between 1st and 2nd round. Probably some bad unique key evaluation.
Firmware.count in 1st round for ems1 (which isn't tested before) gives 22 Firmwares https://github.com/ManageIQ/manageiq-providers-lenovo/pull/238/files#diff-ff337ad5f24e45e4fbe0d6a7a21eed09R159

@slemrmartin
Copy link
Contributor Author

#233 integrated

@Ladas
Copy link
Contributor

Ladas commented Oct 23, 2018

@slemrmartin can you rebase?

@slemrmartin
Copy link
Contributor Author

slemrmartin commented Oct 23, 2018

@douglasgabriel Are you from Lenovo? Please notice that Refresh spec is now using graph refresh code instead old code.

Based on flag https://github.com/ManageIQ/manageiq-providers-lenovo/pull/238/files#diff-ff337ad5f24e45e4fbe0d6a7a21eed09R39

and https://github.com/ManageIQ/manageiq-providers-lenovo/pull/236/files#diff-646ad6b10917e4385cbcc8c8524e24a2R373 (which will switch using graph refresh in production too)

@slemrmartin
Copy link
Contributor Author

@EsdrasVP pls notice ^^^

@@ -17,6 +32,19 @@
end
end

before(:each) do
stub_settings_merge(
Copy link
Contributor

Choose a reason for hiding this comment

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

we should be testing the old refresh too, if we are keeping it around

also e.g. on Azure we test that old refresh and new refresh result in the same DB records.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's tested, I'll add it

expect(ComputerSystem.count).to eq(10)
expect(Hardware.count).to eq(11)
expect(GuestDevice.count).to eq(14)
# expect(Firmware.count).to eq(20)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@douglasgabriel This line is not true for first round of old refresh. It's equal only in 2nd round and both rounds of graph refresh

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# expect(Firmware.count).to eq(20)
expect(Firmware.count).to eq(20)

Please rebase this PR and remove the #

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@CharlleDaniel
Copy link
Member

CharlleDaniel commented Oct 31, 2018

integrated #232 to graph refresh
@CharlleDaniel your PR contains some bug, when I run your (current) refresh against this extended refresher_spec, then value of Firmware.count differs between 1st and 2nd round. Probably some bad unique key evaluation.
Firmware.count in 1st round for ems1 (which isn't tested before) gives 22 Firmwares https://github.com/ManageIQ/manageiq-providers-lenovo/pull/238/files#diff-ff337ad5f24e45e4fbe0d6a7a21eed09R159

@slemrmartin thanks for you report, I found a little problem in the firmware parse of Guest Devices and I did open a PR to fix this.

@slemrmartin
Copy link
Contributor Author

@Ladas please merge

@Ladas Ladas self-assigned this Nov 6, 2018
@Ladas Ladas added the test label Nov 6, 2018
@miq-bot
Copy link
Member

miq-bot commented Nov 8, 2018

This pull request is not mergeable. Please rebase and repush.

@slemrmartin
Copy link
Contributor Author

merged #235 refresher_spec changes

@slemrmartin slemrmartin force-pushed the graph-refresh-spec branch 2 times, most recently from ed4d38b to f98b576 Compare November 9, 2018 10:14
@miq-bot
Copy link
Member

miq-bot commented Nov 12, 2018

Checked commits slemrmartin/manageiq-providers-lenovo@f02cb5f~...2596c62 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 1 offense detected

spec/models/manageiq/providers/lenovo/physical_infra_manager/refresher_spec.rb

Copy link
Contributor

@Ladas Ladas left a comment

Choose a reason for hiding this comment

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

👍

@Ladas Ladas removed the unmergeable label Nov 12, 2018
@Ladas Ladas merged commit a7045cd into ManageIQ:master Nov 12, 2018
@Ladas Ladas added this to the Sprint 99 Ending Nov 19, 2018 milestone Nov 12, 2018
@slemrmartin slemrmartin deleted the graph-refresh-spec branch November 12, 2018 13:54
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.

4 participants