CreateChangeUsingMultiGerrit: Fix 401 towards 8081

Make the DeleteChangeUsingMultiGerrit1 scenario use its own http
password towards the 8081 gerrit. Make the CreateChangeUsingMultiGerrit
scenario do the same upon injecting DeleteChangeUsingMultiGerrit1's
test. The other CreateChangeUsingMultiGerrit steps still use 8080's
own (cluster, 8082) http password for the admin test user. As usual with
the core framework, this requires an http.password_replica entry in [1]
locally; cf. [2]:

[1] e2e-tests/src/test/resources/application.conf
[2] https://gerrit-documentation.storage.googleapis.com/Documentation/3.0.9/dev-e2e-tests.html#_project_and_http_credentials

Fixing the previous 401 'unauthorized' http error this way leads to
DeleteChangeUsingMultiGerrit1 now failing with a 404 not-found error.
That is likely because the change created from 8082 (8080) is not
synchronized towards 8081 by the dockerised_local_env (new Issue 12863).

Bug: Issue 12693
Change-Id: I81d0c8c2b464455340b1e9a6f8fa9b28e5fdf302
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/CreateChangeUsingMultiGerrit.scala b/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/CreateChangeUsingMultiGerrit.scala
index 8fcddd4..f6e610b 100644
--- a/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/CreateChangeUsingMultiGerrit.scala
+++ b/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/CreateChangeUsingMultiGerrit.scala
@@ -55,7 +55,7 @@
     deleteChange.test.inject(
       nothingFor(stepWaitTime(deleteChange) seconds),
       atOnceUsers(1)
-    ),
+    ).protocols(deleteChange.httpForReplica),
     deleteProject.test.inject(
       nothingFor(stepWaitTime(deleteProject) seconds),
       atOnceUsers(1)
diff --git a/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/DeleteChangeUsingMultiGerrit1.scala b/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/DeleteChangeUsingMultiGerrit1.scala
index cac806a..e086efe 100644
--- a/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/DeleteChangeUsingMultiGerrit1.scala
+++ b/src/test/scala/com/googlesource/gerrit/plugins/multisite/scenarios/DeleteChangeUsingMultiGerrit1.scala
@@ -15,10 +15,12 @@
 package com.googlesource.gerrit.plugins.multisite.scenarios
 
 import com.google.gerrit.scenarios.GerritSimulation
+import com.typesafe.config.ConfigFactory
 import io.gatling.core.Predef.{atOnceUsers, _}
 import io.gatling.core.feeder.FeederBuilder
 import io.gatling.core.structure.ScenarioBuilder
 import io.gatling.http.Predef.http
+import io.gatling.http.protocol.HttpProtocolBuilder
 
 class DeleteChangeUsingMultiGerrit1 extends GerritSimulation {
   private val data: FeederBuilder = jsonFile(resource).convert(keys).queue
@@ -30,6 +32,10 @@
     replaceProperty("http_port1", 8081, in)
   }
 
+  val httpForReplica: HttpProtocolBuilder = http.basicAuth(
+    conf.httpConfiguration.userName,
+    ConfigFactory.load().getString("http.password_replica"))
+
   val test: ScenarioBuilder = scenario(unique)
     .feed(data)
     .exec(session => {
@@ -44,5 +50,5 @@
   setUp(
     test.inject(
       atOnceUsers(1)
-    )).protocols(httpProtocol)
+    )).protocols(httpForReplica)
 }