Skip to content

Commit

Permalink
tests: Fix mounts test for unmounting volume.
Browse files Browse the repository at this point in the history
We no longer check for namespace and return true while
unmounting. Change test according to this.

Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Jun 21, 2017
1 parent 97922b5 commit b8ffdb1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/mount_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ START_TEST(test_cc_oci_handle_mounts) {
config = cc_oci_config_create ();
ck_assert (config);

g_strlcpy (config->workload_dir,
"/tmp",
sizeof (config->workload_dir));

cc_oci_json_parse(&node, TEST_DATA_DIR "/mounts.json");
mounts_spec_handler.handle_section(
node_find_child(node, mounts_spec_handler.name), config);
Expand Down Expand Up @@ -108,11 +112,9 @@ START_TEST(test_cc_oci_handle_umounts) {
mounts_spec_handler.handle_section(
node_find_child(node, mounts_spec_handler.name), config);

/**
* cc_oci_handle_unmounts returns true when there
* is not a mount namespace with path
/* We no longer check for mount namespace
*/
ck_assert(cc_oci_handle_unmounts(config));
ck_assert(! cc_oci_handle_unmounts(config));

cc_oci_config_free(config);
g_free_node(node);
Expand Down

0 comments on commit b8ffdb1

Please sign in to comment.