@@ -41,34 +41,19 @@ let test_set_repositories () =
41
41
Xapi_pool. set_repositories ~__context ~self ~value: [ref_bundle] ;
42
42
Xapi_pool. set_repositories ~__context ~self ~value: [ref_remote_pool] ;
43
43
Alcotest. check_raises " test_set_repositories_1"
44
- Api_errors. (
45
- Server_error
46
- ( repo_should_be_single_one_enabled
47
- , [Record_util. origin_to_string `bundle ]
48
- )
49
- )
44
+ Api_errors. (Server_error (repo_should_be_single_one_enabled, [] ))
50
45
(fun () ->
51
46
Xapi_pool. set_repositories ~__context ~self
52
47
~value: [ref_remote; ref_bundle]
53
48
) ;
54
49
Alcotest. check_raises " test_set_repositories_2"
55
- Api_errors. (
56
- Server_error
57
- ( repo_should_be_single_one_enabled
58
- , [`bundle ; `remote_pool ] |> List. map Record_util. origin_to_string
59
- )
60
- )
50
+ Api_errors. (Server_error (repo_should_be_single_one_enabled, [] ))
61
51
(fun () ->
62
52
Xapi_pool. set_repositories ~__context ~self
63
53
~value: [ref_remote_pool; ref_bundle]
64
54
) ;
65
55
Alcotest. check_raises " test_set_repositories_3"
66
- Api_errors. (
67
- Server_error
68
- ( repo_should_be_single_one_enabled
69
- , [Record_util. origin_to_string `remote_pool ]
70
- )
71
- )
56
+ Api_errors. (Server_error (repo_should_be_single_one_enabled, [] ))
72
57
(fun () ->
73
58
Xapi_pool. set_repositories ~__context ~self
74
59
~value: [ref_remote; ref_remote_pool]
@@ -78,45 +63,25 @@ let test_set_repositories () =
78
63
let test_add_repository () =
79
64
on_repositories (fun __context self ref_remote ref_bundle ref_remote_pool ->
80
65
Alcotest. check_raises " test_add_repository_1"
81
- Api_errors. (
82
- Server_error
83
- ( repo_should_be_single_one_enabled
84
- , [Record_util. origin_to_string `bundle ]
85
- )
86
- )
66
+ Api_errors. (Server_error (repo_should_be_single_one_enabled, [] ))
87
67
(fun () ->
88
68
Xapi_pool. set_repositories ~__context ~self ~value: [ref_remote] ;
89
69
Xapi_pool. add_repository ~__context ~self ~value: ref_bundle
90
70
) ;
91
71
Alcotest. check_raises " test_add_repository_2"
92
- Api_errors. (
93
- Server_error
94
- ( repo_should_be_single_one_enabled
95
- , [Record_util. origin_to_string `remote_pool ]
96
- )
97
- )
72
+ Api_errors. (Server_error (repo_should_be_single_one_enabled, [] ))
98
73
(fun () ->
99
74
Xapi_pool. set_repositories ~__context ~self ~value: [ref_remote] ;
100
75
Xapi_pool. add_repository ~__context ~self ~value: ref_remote_pool
101
76
) ;
102
77
Alcotest. check_raises " test_add_repository_3"
103
- Api_errors. (
104
- Server_error
105
- ( repo_should_be_single_one_enabled
106
- , [`remote_pool ; `bundle ] |> List. map Record_util. origin_to_string
107
- )
108
- )
78
+ Api_errors. (Server_error (repo_should_be_single_one_enabled, [] ))
109
79
(fun () ->
110
80
Xapi_pool. set_repositories ~__context ~self ~value: [ref_remote_pool] ;
111
81
Xapi_pool. add_repository ~__context ~self ~value: ref_bundle
112
82
) ;
113
83
Alcotest. check_raises " test_add_repository_4"
114
- Api_errors. (
115
- Server_error
116
- ( repo_should_be_single_one_enabled
117
- , [`bundle ; `remote_pool ] |> List. map Record_util. origin_to_string
118
- )
119
- )
84
+ Api_errors. (Server_error (repo_should_be_single_one_enabled, [] ))
120
85
(fun () ->
121
86
Xapi_pool. set_repositories ~__context ~self ~value: [ref_bundle] ;
122
87
Xapi_pool. add_repository ~__context ~self ~value: ref_remote_pool
0 commit comments