Skip to content

Commit 052d494

Browse files
committed
CP-311612: skip VDI.other-config test on SMAPIv3+
This seems to be a SMAPIv1 specific implementation detail (content_id in VDI.other-config), that is missing on SMAPIv3 SRs. The rest of the test works on SMAPIv3, so skip just this step. Signed-off-by: Edwin Török <edwin.torok@citrix.com> (cherry picked from commit ceebe4b)
1 parent bc3f4c5 commit 052d494

2 files changed

Lines changed: 15 additions & 10 deletions

File tree

ocaml/quicktest/qt_filter.mli

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ module SR : sig
6868
val not_type : string -> srs -> srs
6969
(** Filters out SRs of the given type *)
7070

71+
val is_smapiv1 : Qt.sr_info -> bool
72+
(** Whether this is a v1 (true) or v3+ (false) SR *)
73+
7174
val smapiv1 : srs -> srs
7275
(** Selects SMAPIv1 SRs *)
7376

ocaml/quicktest/quicktest_cbt.ml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,21 @@ let vdi_data_destroy_test rpc session_id sr_info () =
7373
(VDI.get_type ~session_id ~rpc ~self:snapshot) ;
7474
assert_cbt_status true ~rpc ~session_id ~vDI:snapshot
7575
~msg:"VDI snapshot cbt_enabled field erroneously set to false" ;
76+
7677
(* test_vdi_update ~session_id snapshot;
7778
temporarily comment this out as it is blocked on CA-273981
7879
VDI.update doesn't currently work on cbt-metadata VDIs *)
79-
let content_id_str = "/No content: this is a cbt_metadata VDI/" in
80-
Alcotest.(check string)
81-
(Printf.sprintf
82-
"VDI.data_destroy failed to update VDI.content_id to \"%s\""
83-
content_id_str
84-
)
85-
(VDI.get_other_config ~session_id ~rpc ~self:snapshot
86-
|> List.assoc "content_id"
87-
)
88-
content_id_str
80+
if Qt_filter.SR.is_smapiv1 sr_info then
81+
let content_id_str = "/No content: this is a cbt_metadata VDI/" in
82+
Alcotest.(check string)
83+
(Printf.sprintf
84+
"VDI.data_destroy failed to update VDI.content_id to \"%s\""
85+
content_id_str
86+
)
87+
(VDI.get_other_config ~session_id ~rpc ~self:snapshot
88+
|> List.assoc "content_id"
89+
)
90+
content_id_str
8991
)
9092

9193
(* Check VDI.{copy, clone} all properly update cbt_enabled

0 commit comments

Comments
 (0)