aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-10-19 21:35:06 +0200
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2017-10-20 14:04:05 +0200
commit39fab1020379d8e4554e5ddf1f269f11a37b6953 (patch)
treeea2f941346edf709515dc234940608b226a8aa5f /src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java
parentcc519a047821d7e48b642d95ee6f7dfe2350bed8 (diff)
Add Path argument to supportsModifications, supports*LinksNatively.
This works better with UnionFileSystem, as (eg.) different mapped file systems might not agree on whether they are read-only. No actual code changes have been made that actually uses this argument, so this should be a behaviour no-op. PiperOrigin-RevId: 172782759
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java b/src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java
index 780a529e87..0c8cf77360 100644
--- a/src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java
+++ b/src/test/java/com/google/devtools/build/lib/vfs/UnionFileSystemTest.java
@@ -136,8 +136,8 @@ public class UnionFileSystemTest extends SymlinkAwareFileSystemTest {
// read-only, even if the delegate filesystems are read/write.
@Test
public void testModificationFlag() throws Exception {
- assertThat(unionfs.supportsModifications()).isTrue();
Path outPath = unionfs.getPath("/out/foo.txt");
+ assertThat(unionfs.supportsModifications(outPath)).isTrue();
assertThat(unionfs.createDirectory(outPath.getParentDirectory())).isTrue();
OutputStream outFile = unionfs.getOutputStream(outPath);
outFile.write('b');
@@ -148,7 +148,7 @@ public class UnionFileSystemTest extends SymlinkAwareFileSystemTest {
// Note that this does not destroy the underlying filesystems;
// UnionFileSystem is just a view.
unionfs = createDefaultUnionFileSystem(true);
- assertThat(unionfs.supportsModifications()).isFalse();
+ assertThat(unionfs.supportsModifications(outPath)).isFalse();
InputStream outFileInput = unionfs.getInputStream(outPath);
int outFileByte = outFileInput.read();