Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ee2f36e authored by Steve Fung's avatar Steve Fung
Browse files

crash_reporter: Clean up symlinks in unit test

The user collector test creates several symlinks to the temporary
directory that it doesn't unlink.  Fix it.

BUG=27365098
TEST=run `crash_reporter_tests`, tests pass, no symlinks are left behind

Change-Id: I7ad24c528dc842e17fa3569ea010f43d34e0bd75
parent a692f431
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -186,10 +186,10 @@ TEST_F(UserCollectorTest, GetSymlinkTarget) {
        test_dir_.path().Append("test/this_link").value().c_str();
    this_link.assign(long_link.c_str(), len);
    ASSERT_EQ(len, this_link.size());
    unlink(kLink);
    ASSERT_EQ(0, symlink(this_link.c_str(), kLink));
    ASSERT_TRUE(collector_.GetSymlinkTarget(FilePath(kLink), &result));
    ASSERT_EQ(this_link, result.value());
    unlink(kLink);
  }
}