MCPcopy Create free account
hub / github.com/apache/mesos / TEST_F_TEMP_DISABLED_ON_WINDOWS

Function TEST_F_TEMP_DISABLED_ON_WINDOWS

src/tests/common/command_utils_tests.cpp:71–92  ·  view source on GitHub ↗

Tests the archive APIs for a simple file.

Source from the content-addressed store, hash-verified

69
70// Tests the archive APIs for a simple file.
71TEST_F_TEMP_DISABLED_ON_WINDOWS(TarTest, File)
72{
73 // Create a test file.
74 const Path testFile("testfile");
75 ASSERT_SOME(createTestFile(testFile));
76
77 // Archive the test file.
78 const Path outputTarFile("test.tar");
79 AWAIT_ASSERT_READY(command::tar(testFile, outputTarFile, None()));
80 ASSERT_TRUE(os::exists(outputTarFile));
81
82 // Remove the test file to make sure untar process creates new test file.
83 ASSERT_SOME(os::rm(testFile));
84 ASSERT_FALSE(os::exists(testFile));
85
86 // Untar the tarball and verify that the original file is created.
87 AWAIT_ASSERT_READY(command::untar(outputTarFile));
88 ASSERT_TRUE(os::exists(testFile));
89
90 // Verify that the content is same as original file.
91 EXPECT_SOME_EQ("test", os::read(testFile));
92}
93
94
95// Tests the archive APIs for a simple directory.

Callers

nothing calls this directly

Calls 15

NoneClass · 0.85
untarFunction · 0.85
sha512Function · 0.85
tarFunction · 0.50
existsFunction · 0.50
rmFunction · 0.50
readFunction · 0.50
joinFunction · 0.50
rmdirFunction · 0.50
getcwdFunction · 0.50
writeFunction · 0.50
renameFunction · 0.50

Tested by

no test coverage detected