Merge changes Ib99cb819,Iae54ba77,I79e772d5

* changes:
  Update Gerrit to 3.3.1
  Fix issue when restarting with incompletely created index
  Wrap too long lines in test code
diff --git a/container-images/gerrit-base/Dockerfile b/container-images/gerrit-base/Dockerfile
index fb1d413..e206f4b 100644
--- a/container-images/gerrit-base/Dockerfile
+++ b/container-images/gerrit-base/Dockerfile
@@ -13,7 +13,7 @@
     mkdir -p /var/war
 
 # Download Gerrit release
-ARG GERRIT_WAR_URL=https://gerrit-releases.storage.googleapis.com/gerrit-3.3.0.war
+ARG GERRIT_WAR_URL=https://gerrit-releases.storage.googleapis.com/gerrit-3.3.1.war
 RUN curl -k -o /var/war/gerrit.war ${GERRIT_WAR_URL} && \
     ln -s /var/war/gerrit.war /var/gerrit/bin/gerrit.war
 
diff --git a/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/reindex.py b/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/reindex.py
index ac4ae9a..28cd84e 100755
--- a/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/reindex.py
+++ b/container-images/gerrit-init/tools/gerrit-initializer/initializer/tasks/reindex.py
@@ -74,7 +74,7 @@
             return False
 
         for index, index_attrs in self.configured_indices.items():
-            if index_attrs["version"] is not indices[index]:
+            if index not in indices or index_attrs["version"] is not indices[index]:
                 return False
         return True
 
diff --git a/helm-charts/gerrit-replica/Chart.yaml b/helm-charts/gerrit-replica/Chart.yaml
index c995e1a..8fd563e 100644
--- a/helm-charts/gerrit-replica/Chart.yaml
+++ b/helm-charts/gerrit-replica/Chart.yaml
@@ -1,5 +1,5 @@
 apiVersion: v2
-appVersion: 3.3.0
+appVersion: 3.3.1
 description: |-
     The Gerrit replica serves as a read-only Gerrit instance to serve repositories
     that it receives from a Gerrit instance via replication. It can be used to
diff --git a/helm-charts/gerrit/Chart.yaml b/helm-charts/gerrit/Chart.yaml
index b2077dd..c8c7a05 100644
--- a/helm-charts/gerrit/Chart.yaml
+++ b/helm-charts/gerrit/Chart.yaml
@@ -1,5 +1,5 @@
 apiVersion: v2
-appVersion: 3.3.0
+appVersion: 3.3.1
 description: |-
     Gerrit is a free, web-based team code collaboration tool. Software developers
     in a team can review each other's modifications on their source code using
diff --git a/tests/container-images/gerrit-init/test_container_integration_gerrit_init_reindexing.py b/tests/container-images/gerrit-init/test_container_integration_gerrit_init_reindexing.py
index 8f50e50..04db1bf 100644
--- a/tests/container-images/gerrit-init/test_container_integration_gerrit_init_reindexing.py
+++ b/tests/container-images/gerrit-init/test_container_integration_gerrit_init_reindexing.py
@@ -62,7 +62,10 @@
             os.path.join(temp_site, "index", "gerrit_index.config")
         )
         exit_code, _ = container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml init"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml init"
+            )
         )
         assert exit_code == 0
         expected_files = ["gerrit_index.config"] + self._get_indices(
@@ -74,7 +77,10 @@
         timestamp_index_dir = os.path.getctime(os.path.join(temp_site, "index"))
 
         exit_code, _ = container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml reindex"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml reindex"
+            )
         )
         assert exit_code == 0
         assert timestamp_index_dir == os.path.getctime(os.path.join(temp_site, "index"))
@@ -83,12 +89,18 @@
         self, container_run_endless, temp_site
     ):
         container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml init"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml init"
+            )
         )
         os.remove(os.path.join(temp_site, "index", "gerrit_index.config"))
 
         exit_code, _ = container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml reindex"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml reindex"
+            )
         )
         assert exit_code == 0
 
@@ -97,7 +109,10 @@
 
     def test_gerrit_init_fixes_unready_indices(self, container_run_endless):
         container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml init"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml init"
+            )
         )
 
         indices = self._get_indices(container_run_endless)
@@ -107,7 +122,10 @@
         )
 
         exit_code, _ = container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml reindex"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml reindex"
+            )
         )
         assert exit_code == 0
 
@@ -116,7 +134,10 @@
 
     def test_gerrit_init_fixes_outdated_indices(self, container_run_endless, temp_site):
         container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml init"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml init"
+            )
         )
 
         index = self._get_indices(container_run_endless)[0]
@@ -129,7 +150,10 @@
         )
 
         exit_code, _ = container_run_endless.exec_run(
-            "python3 /var/tools/gerrit-initializer -s /var/gerrit -c /var/config/default.config.yaml reindex"
+            (
+                "python3 /var/tools/gerrit-initializer "
+                "-s /var/gerrit -c /var/config/default.config.yaml reindex"
+            )
         )
         assert exit_code == 0