Merge "e2e-tests: Support optional parent in CreateProject" into stable-3.0

This commit is contained in:
Marco Miller
2020-09-05 00:59:47 +00:00
committed by Gerrit Code Review
4 changed files with 7 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
{
"create_empty_commit": "true"
"create_empty_commit": "true",
"parent": "${parent}"
}

View File

@@ -1,5 +1,6 @@
[
{
"url": "HTTP_SCHEME://HOSTNAME:HTTP_PORT/a/projects/PROJECT"
"url": "HTTP_SCHEME://HOSTNAME:HTTP_PORT/a/projects/PROJECT",
"parent": "PARENT"
}
]

View File

@@ -28,7 +28,7 @@ class CreateProject extends ProjectSimulation {
val test: ScenarioBuilder = scenario(unique)
.feed(data)
.exec(httpRequest.body(RawFileBody(body)).asJson)
.exec(httpRequest.body(ElFileBody(body)).asJson)
setUp(
test.inject(

View File

@@ -67,6 +67,8 @@ class GerritSimulation extends Simulation {
case ("number", number) =>
val precedes = replaceKeyWith("_number", 0, number.toString)
replaceProperty("number", 1, precedes)
case ("parent", parent) =>
replaceProperty("parent", "All-Projects", parent.toString)
case ("project", project) =>
var precedes = replaceKeyWith("_project", name, project.toString)
precedes = replaceOverride(precedes)