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

Fix: failure domain unit tests #223

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 12 additions & 16 deletions microceph/ceph/osd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,18 @@ func (s *osdSuite) SetupTest() {
// TestSwitchHostFailureDomain tests the switchFailureDomain function
func (s *osdSuite) TestSwitchHostFailureDomain() {
r := mocks.NewRunner(s.T())
// list and create two crush rules
addCrushRuleLsExpectations(r)
addCrushRuleCreateExpectations(r)
addCrushRuleCreateExpectations(r)
// dump crush rules

// dump crush rules to resolve names
addCrushRuleDumpExpectations(r)
// set default crush rule
addSetDefaultRuleExpectations(r)
// list and dump crush rule
// list to check if crush rule exists
addCrushRuleLsExpectations(r)
// dump crush rules to resolve names
addCrushRuleDumpExpectations(r)
// list crush rule json
// list pools
addCrushRuleLsJsonExpectations(r)
// set osd pool
// set pool crush rule
addOsdPoolSetExpectations(r)

processExec = r
Expand All @@ -149,20 +147,18 @@ func (s *osdSuite) TestUpdateFailureDomain() {
}

r := mocks.NewRunner(s.T())
// list and create two crush rules
addCrushRuleLsExpectations(r)
addCrushRuleCreateExpectations(r)
addCrushRuleCreateExpectations(r)
// dump crush rules

// dump crush rules to resolve names
addCrushRuleDumpExpectations(r)
// set default crush rule
addSetDefaultRuleExpectations(r)
// list and dump crush rule
// list to check if crush rule exists
addCrushRuleLsExpectations(r)
// dump crush rules to resolve names
addCrushRuleDumpExpectations(r)
// list crush rule json
// list pools
addCrushRuleLsJsonExpectations(r)
// set osd pool
// set pool crush rule
addOsdPoolSetExpectations(r)

processExec = r
Expand Down
Loading