@@ -53,22 +53,4 @@ def test_set_processing_duration
53
53
assert_equal ( expect_duration , actual_duration )
54
54
end
55
55
end
56
-
57
- def test_get_failed_bag_ids
58
- failed_status = [ BagStatus ::DEPOSIT_SKIPPED , BagStatus ::FAILED , BagStatus ::VALIDATION_SKIPPED , BagStatus ::VERIFY_FAILED ]
59
-
60
- bag_mock = Minitest ::Mock . new
61
- bag_mock . expect ( :join , bag_mock , [ :status_event , Sequel . qualify ( :status_event , :bag_id ) => Sequel . qualify ( :bag , :id ) ] )
62
- bag_mock . expect ( :join , bag_mock , [ :status , Sequel . qualify ( :status , :id ) => Sequel . qualify ( :status_event , :status_id ) ] )
63
- bag_mock . expect ( :where , bag_mock , [ Sequel . qualify ( :status_event , :timestamp ) >= @start_time ] )
64
- bag_mock . expect ( :where , bag_mock , [ Sequel . qualify ( :status , :name ) . like ( "%#{ failed_status . join ( '%' ) } %" ) ] )
65
- bag_mock . expect ( :group , bag_mock , [ Sequel [ :bag ] [ :identifier ] ] )
66
- bag_mock . expect ( :select_map , [ '4355a' , 'hgfb5' ] , Sequel [ :bag ] [ :identifier ] )
67
-
68
- DatabaseSchema ::Bag . stub ( :call , bag_mock ) do
69
- failed_bag_ids = @metrics . get_failed_bag_ids
70
- expected_bag_ids = [ '4355a' , 'hgfb5' ]
71
- assert_equal expected_bag_ids , failed_bag_ids
72
- end
73
- end
74
56
end
0 commit comments