@Test
@TestDir
@TestJetty
@TestHdfs
public void testGetSnapshotList() throws Exception {

  createHttpFSServer(false, false);
  // Create test directories
  String pathStr = "/tmp/tmp-snap-list-test-1";
  createDirWithHttp(pathStr, "700", null);
  Path path = new Path(pathStr);
  DistributedFileSystem dfs = (DistributedFileSystem) FileSystem.get(
      path.toUri(), TestHdfsHelper.getHdfsConf());
  // Enable snapshot for path1
  dfs.allowSnapshot(path);
  Assert.assertTrue(dfs.getFileStatus(path).isSnapshotEnabled());
  // Verify response when there is one snapshottable directory
  verifyGetSnapshotList(dfs, path);
  // Create a file and take a snapshot
  String file1 = pathStr + "/file1";
  createWithHttp(file1, null);
  dfs.createSnapshot(path, "snap1");
  // Create another file and take a snapshot
  String file2 = pathStr + "/file2";
  createWithHttp(file2, null);
  dfs.createSnapshot(path, "snap2");
  verifyGetSnapshotList(dfs, path);
}