Skip to content

Commit

Permalink
test: UTs related to deleted functions are removed
Browse files Browse the repository at this point in the history
  • Loading branch information
sdvendramini committed Aug 12, 2024
1 parent 7a253cc commit 7947f35
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 1,586 deletions.
33 changes: 0 additions & 33 deletions src/common/file_op/tests/unit/tests/test_file_op.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,40 +239,8 @@ void test_w_is_compressed_bz2_file_uncompressed(void **state) {
assert_int_equal(ret, 0);
}

// w_uncompress_bz2_gz_file

#ifdef TEST_SERVER

void test_w_uncompress_bz2_gz_file_bz2(void **state) {

char * path = "/test/file.bz2";
char * dest = "/test/file";
int ret;

expect_string(__wrap_fopen, path, "/test/file.bz2");
expect_string(__wrap_fopen, mode, "rb");
will_return(__wrap_fopen, 1);

will_return(__wrap_fread, "BZh");
will_return(__wrap_fread, 3);

expect_string(__wrap_bzip2_uncompress, filebz2, "/test/file.bz2");
expect_string(__wrap_bzip2_uncompress, file, "/test/file");
will_return(__wrap_bzip2_uncompress, 0);

expect_string(__wrap_fopen, path, "/test/file.bz2");
expect_string(__wrap_fopen, mode, "rb");
will_return(__wrap_fopen, 0);

expect_string(__wrap__mdebug1, formatted_msg, "The file '/test/file.bz2' was successfully uncompressed into '/test/file'");

expect_value(__wrap_fclose, _File, 1);
will_return(__wrap_fclose, 0);

ret = w_uncompress_bz2_gz_file(path, dest);
assert_int_equal(ret, 0);
}

void test_MergeAppendFile_open_fail(void **state) {

FILE * finalfp = (FILE *)5;
Expand Down Expand Up @@ -1121,7 +1089,6 @@ int main(void) {
cmocka_unit_test(test_w_is_compressed_bz2_file_compressed),
cmocka_unit_test(test_w_is_compressed_bz2_file_uncompressed),
#ifdef TEST_SERVER
cmocka_unit_test(test_w_uncompress_bz2_gz_file_bz2),
// MergeAppendFile
cmocka_unit_test(test_MergeAppendFile_open_fail),
cmocka_unit_test(test_MergeAppendFile_fseek_fail),
Expand Down
Loading

0 comments on commit 7947f35

Please sign in to comment.