Skip to content

Commit

Permalink
Fix: failure domain unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Sabaini <peter.sabaini@canonical.com>
  • Loading branch information
sabaini authored and lmlg committed Sep 25, 2023
1 parent 2cf7ddf commit c9ae181
Showing 1 changed file with 12 additions and 16 deletions.
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

0 comments on commit c9ae181

Please sign in to comment.