Skip to content

Conversation

minishrink
Copy link
Contributor

Ported a few simpler tests while waiting around for a build. We should make a list of which would be the most useful tests to port somewhere.

@minishrink minishrink requested a review from gaborigloi April 18, 2018 13:56
]
let assert_equal msg p1 p2 =
let network_purpose = Alcotest_comparators.from_rpc_of_t API.rpc_of_network_purpose in
Alcotest.(check (list network_purpose))
Copy link
Contributor

Choose a reason for hiding this comment

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

We need slist here because it's conceptually a set, the order doesn't matter.

@coveralls
Copy link

coveralls commented Apr 18, 2018

Coverage Status

Coverage increased (+0.04%) to 20.569% when pulling c990c43 on minishrink:alcoblob into f416c08 on xapi-project:master.

Copy link
Contributor

@gaborigloi gaborigloi left a comment

Choose a reason for hiding this comment

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

Looks good , just one minor comment.

let __context = make_test_database () in
upgrade_bios_strings.fn ~__context;
Stdext.Unixext.mkdir_safe "/var/tmp" 0o755;
Stdext.Unixext.write_string_to_file "/var/tmp/.previousInventory" inventory;
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to reference the Xapi_stdext_unix module directly, that way we don't have to depend on the whole of stdext.

@minishrink minishrink force-pushed the alcoblob branch 3 times, most recently from 61bb715 to 202576b Compare April 20, 2018 10:16
let assert_succeed url host port =
Alcotest.(check (pair string int))
"test_split_host_port"
(split url) (host, port)
Copy link
Contributor

Choose a reason for hiding this comment

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

The expected value should go first here

Akanksha Mathur added 7 commits April 20, 2018 11:17
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
Signed-off-by: Akanksha Mathur <akanksha.mathur@citrix.com>
@minishrink minishrink changed the title Port test_{network, pgpu, xapi_db_upgrade} from OUnit to Alcotest framework Port unit tests from OUnit to Alcotest Apr 21, 2018
@minishrink minishrink changed the title Port unit tests from OUnit to Alcotest Port some Xapi unit tests from OUnit to Alcotest framework Apr 21, 2018
@minishrink minishrink merged commit eaa0ee6 into xapi-project:master Apr 23, 2018
@minishrink minishrink deleted the alcoblob branch April 23, 2018 11:37
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.

3 participants