void succeedsWhenSnapshotExists()

in src/testFixtures/java/org/apache/cassandra/sidecar/snapshots/AbstractSnapshotPathBuilderTest.java [474:510]


    void succeedsWhenSnapshotExists()
    {
        String expectedPath = dataDir0.getAbsolutePath() + "/ks1/table1/snapshots/backup.2022-03-17-04-PDT";
        succeedsWhenPathExists(instance.build("localhost",
                                              new SnapshotRequest("ks1",
                                                                  "table1",
                                                                  "backup.2022-03-17-04-PDT",
                                                                  false)),
                               expectedPath);

        expectedPath = dataDir0.getAbsolutePath() + "/data/ks2/table2/snapshots/ea823202-a62c-4603-bb6a-4e15d79091cd";
        succeedsWhenPathExists(instance.build("localhost",
                                              new SnapshotRequest("ks2",
                                                                  "table2",
                                                                  "ea823202-a62c-4603-bb6a-4e15d79091cd",
                                                                  false)),
                               expectedPath);

        expectedPath = dataDir1.getAbsolutePath() + "/ks3/table3/snapshots/snapshot1";
        succeedsWhenPathExists(instance.build("localhost",
                                              new SnapshotRequest("ks3",
                                                                  "table3",
                                                                  "snapshot1",
                                                                  false)),
                               expectedPath);

        // table table4 shares the prefix with table table4abc
        expectedPath = dataDir1.getAbsolutePath()
                       + "/data/ks4/table4abc-a72c8740a57611ec935db766a70c44a1"
                       + "/snapshots/this_is_a_valid_snapshot_name_i_❤_u";
        succeedsWhenPathExists(instance.build("localhost",
                                              new SnapshotRequest("ks4",
                                                                  "table4abc",
                                                                  "this_is_a_valid_snapshot_name_i_❤_u",
                                                                  false)),
                               expectedPath);
    }