mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-06 22:13:08 -06:00
Merge branch 'main' of github.com:nosqlbench/nosqlbench
This commit is contained in:
commit
e4252bdfde
@ -98,7 +98,7 @@ public class NBCLIScenarioParser {
|
||||
.prefix(includes)
|
||||
.name(workloadName)
|
||||
.extension(RawStmtsLoader.YAML_EXTENSIONS)
|
||||
.one();
|
||||
.first().orElseThrow();
|
||||
|
||||
StmtsDocList stmts = StatementsLoader.loadContent(logger, yamlWithNamedScenarios, userParams);
|
||||
|
||||
|
@ -125,6 +125,16 @@ public class NBCLIScenarioParserTest {
|
||||
assertThat(cmds.size()).isGreaterThan(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testThatScenarioUrlsAreSupported() {
|
||||
//TODO: This might change?
|
||||
String urlScenario = "https://raw.githubusercontent.com/nosqlbench/nosqlbench/main/engine-cli/src/test/resources/activities/scenario-test.yaml";
|
||||
|
||||
NBCLIOptions opts = new NBCLIOptions(new String[]{ urlScenario, "schema-only", "cycles-test=20"});
|
||||
List<Cmd> cmds = opts.getCommands();
|
||||
assertThat(cmds.size()).isGreaterThan(0);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSanitizer() {
|
||||
String sanitized = NBCLIScenarioParser.sanitize("A-b,c_d");
|
||||
|
@ -10,6 +10,7 @@ import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@ -73,7 +74,7 @@ public class URLContent implements Content<URL> {
|
||||
|
||||
@Override
|
||||
public Path asPath() {
|
||||
return null;
|
||||
return Paths.get(url.getPath());
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
|
Loading…
Reference in New Issue
Block a user