Skip to content

Conversation

jonludlam
Copy link
Contributor

Signed-off-by: Jon Ludlam jonathan.ludlam@citrix.com

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>

(executable
((name database_server_main)
(public_name database_server)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you set a public name it'll get installed, is that what you intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, copy-pasta mistake - thanks!

let find name t =
try
List.find (fun col -> col.Column.name = name) t.columns
with Not_found ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks it is always annoying when you get Not_found in the logs not knowing what was not found...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

Copy link
Contributor

@mseri mseri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some minor comments. It's a giant test that you resurrected there!!

@@ -1,3 +1,6 @@
open Xapi_stdext_threads
open Xapi_stdext_unix
open Xapi_stdext_threads
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already opened above



open Xapi_stdext_pervasives
open Xapi_stdext_monadic
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is opened above

let find name t =
try
List.find (fun col -> col.Column.name = name) t.columns
with Not_found ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed!

Schema.Table.name = "VM";
columns = [ _ref; uuid; name_label; vbds; pp; name_description; tags; other_config ];
columns = [ _ref; uuid; name_label; vbds; pp;
name_description; tags; other_config ];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you really mean to split them like this?

@coveralls
Copy link

coveralls commented Feb 16, 2018

Coverage Status

Coverage increased (+0.3%) to 18.115% when pulling 0583a91 on jonludlam:resurrect-db-test into eec9e3e on xapi-project:master.

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
then failwith (Printf.sprintf "check_many_to_many: bar(bar:1).foos expected ('foo:1') got %s" (Schema.Value.marshal bar_foos));

(* set foo.bars to [] *)
(* let foo_1 = Table.find "foo:1" (TableSet.find "foo" (Database.tableset db)) in*)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you left this line commented out?




()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The choice of spacing and newlines are "interesting" in some part of this code 😜

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I've forgotten to ocp-indent it.


(* let xs = Client.read_set_ref t where_name_label in
if not (List.mem name xs)
then failwith "read_set_ref <valid table> <valid return> <valid field> <valid value>";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you disabled this subtest?

Copy link
Contributor

@mseri mseri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple of questions concerning two parts of the tests that are commented, otherwise this looks like a good thing to have (and +0.5% in xapi coverage... wow, that's huge)

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
@mseri mseri merged commit 7f8ac5f into xapi-project:master Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants