Add a mark for structure tests

Change-Id: I3d9af25b48e2d384bb02b286a91c27fe00111311
diff --git a/README.md b/README.md
index de7adff..116340f 100644
--- a/README.md
+++ b/README.md
@@ -211,3 +211,9 @@
 ### slow
 
 Marks tests that need an above average time to run.
+
+### structure
+
+Marks structure tests. These tests are meant to test, whether certain components
+exist in a container. These tests ensure that components expected by the users
+of the container, e.g. the helm charts, are present in the containers.
diff --git a/setup.cfg b/setup.cfg
index de7d3d2..d8a3c71 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -5,3 +5,4 @@
   docker: Tests that require to run and interact with a docker container
   incremental: Test classes containing tests that need to run incrementally
   slow: Tests that run slower than the average test
+  structure: Structure tests
diff --git a/tests/container-images/apache-git-http-backend/test_container_build_apache_git_http_backend.py b/tests/container-images/apache-git-http-backend/test_container_build_apache_git_http_backend.py
index d0b0f09..984d6be 100644
--- a/tests/container-images/apache-git-http-backend/test_container_build_apache_git_http_backend.py
+++ b/tests/container-images/apache-git-http-backend/test_container_build_apache_git_http_backend.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_build_apache_git_http_backend_image(
     apache_git_http_backend_image, tag_of_cached_container
 ):
diff --git a/tests/container-images/apache-git-http-backend/test_container_structure_apache_git_http_backend.py b/tests/container-images/apache-git-http-backend/test_container_structure_apache_git_http_backend.py
index 6c530d0..de3e8bc 100755
--- a/tests/container-images/apache-git-http-backend/test_container_structure_apache_git_http_backend.py
+++ b/tests/container-images/apache-git-http-backend/test_container_structure_apache_git_http_backend.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_apache_git_http_backend_inherits_from_base(apache_git_http_backend_image):
     contains_tag = False
     for layer in apache_git_http_backend_image.history():
@@ -25,12 +26,14 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_apache_git_http_backend_contains_apache2(container_run):
     exit_code, _ = container_run.exec_run("which httpd")
     assert exit_code == 0
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_apache_git_http_backend_http_site_configured(container_run):
     exit_code, _ = container_run.exec_run(
         "test -f /etc/apache2/conf.d/git-http-backend.conf"
@@ -39,6 +42,7 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_apache_git_http_backend_https_site_configured(container_run):
     exit_code, _ = container_run.exec_run(
         "test -f /etc/apache2/conf.d/git-https-backend.conf"
@@ -47,17 +51,20 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_apache_git_http_backend_contains_start_script(container_run):
     exit_code, _ = container_run.exec_run("test -f /var/tools/start")
     assert exit_code == 0
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_apache_git_http_backend_contains_repo_creation_cgi_script(container_run):
     exit_code, _ = container_run.exec_run("test -f /var/cgi/create_repo.sh")
     assert exit_code == 0
 
 
+@pytest.mark.structure
 def test_apache_git_http_backend_has_entrypoint(apache_git_http_backend_image):
     entrypoint = apache_git_http_backend_image.attrs["ContainerConfig"]["Entrypoint"]
     assert len(entrypoint) == 2
diff --git a/tests/container-images/base/test_container_build_base.py b/tests/container-images/base/test_container_build_base.py
index 251cac4..2a3afa5 100644
--- a/tests/container-images/base/test_container_build_base.py
+++ b/tests/container-images/base/test_container_build_base.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_build_base(base_image, tag_of_cached_container):
     if tag_of_cached_container:
         pytest.skip("Cached image used for testing. Build will not be tested.")
diff --git a/tests/container-images/base/test_container_structure_base.py b/tests/container-images/base/test_container_structure_base.py
index a53bcef..528d2b4 100755
--- a/tests/container-images/base/test_container_structure_base.py
+++ b/tests/container-images/base/test_container_structure_base.py
@@ -23,12 +23,14 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_base_contains_git(container_run):
     exit_code, _ = container_run.exec_run("which git")
     assert exit_code == 0
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_base_has_non_root_user_gerrit(container_run):
     exit_code, output = container_run.exec_run("id -u gerrit")
     assert exit_code == 0
@@ -37,6 +39,7 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_base_gerrit_no_root_permissions(container_run):
     exit_code, _ = container_run.exec_run("su -c 'rm -rf /bin' gerrit")
     assert exit_code > 0
diff --git a/tests/container-images/gerrit-base/test_container_build_gerrit_base.py b/tests/container-images/gerrit-base/test_container_build_gerrit_base.py
index 9c6ac1e..93954d8 100644
--- a/tests/container-images/gerrit-base/test_container_build_gerrit_base.py
+++ b/tests/container-images/gerrit-base/test_container_build_gerrit_base.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_build_gerrit_base(gerrit_base_image, tag_of_cached_container):
     if tag_of_cached_container:
         pytest.skip("Cached image used for testing. Build will not be tested.")
diff --git a/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py b/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py
index a42083c..fb70532 100755
--- a/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py
+++ b/tests/container-images/gerrit-base/test_container_structure_gerrit_base.py
@@ -24,6 +24,7 @@
     container_run.stop(timeout=1)
 
 
+@pytest.mark.structure
 def test_gerrit_base_inherits_from_base(gerrit_base_image):
     contains_tag = False
     for layer in gerrit_base_image.history():
@@ -34,6 +35,7 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_base_contains_java8(container_run):
     _, output = container_run.exec_run("java -version")
     output = output.strip().decode("utf-8")
@@ -41,6 +43,7 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_base_java_path(container_run):
     exit_code, output = container_run.exec_run(
         '/bin/ash -c "readlink -f $(which java)"'
@@ -51,6 +54,7 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_base_contains_gerrit_war(container_run):
     exit_code, _ = container_run.exec_run("test -f /var/war/gerrit.war")
     assert exit_code == 0
@@ -60,6 +64,7 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_base_war_contains_gerrit(container_run):
     exit_code, output = container_run.exec_run("java -jar /var/war/gerrit.war version")
     assert exit_code == 0
@@ -75,17 +80,20 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_base_site_permissions(container_run):
     exit_code, _ = container_run.exec_run("test -O /var/gerrit")
     assert exit_code == 0
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_base_war_dir_permissions(container_run):
     exit_code, _ = container_run.exec_run("test -O /var/war")
     assert exit_code == 0
 
 
+@pytest.mark.structure
 def test_gerrit_base_has_entrypoint(gerrit_base_image):
     entrypoint = gerrit_base_image.attrs["ContainerConfig"]["Entrypoint"]
     assert "/var/tools/start" in entrypoint
diff --git a/tests/container-images/gerrit-init/test_container_build_gerrit_init.py b/tests/container-images/gerrit-init/test_container_build_gerrit_init.py
index 1ce4edb..dc16d74 100644
--- a/tests/container-images/gerrit-init/test_container_build_gerrit_init.py
+++ b/tests/container-images/gerrit-init/test_container_build_gerrit_init.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_build_gerrit_init(gerrit_init_image, tag_of_cached_container):
     if tag_of_cached_container:
         pytest.skip("Cached image used for testing. Build will not be tested.")
diff --git a/tests/container-images/gerrit-init/test_container_structure_gerrit_init.py b/tests/container-images/gerrit-init/test_container_structure_gerrit_init.py
index 8411c30..2e5051f 100755
--- a/tests/container-images/gerrit-init/test_container_structure_gerrit_init.py
+++ b/tests/container-images/gerrit-init/test_container_structure_gerrit_init.py
@@ -35,6 +35,7 @@
     return request.param
 
 
+@pytest.mark.structure
 def test_gerrit_init_inherits_from_gerrit_base(gerrit_init_image):
     contains_tag = False
     for layer in gerrit_init_image.history():
@@ -47,17 +48,20 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_init_contains_expected_scripts(container_run, expected_script):
     exit_code, _ = container_run.exec_run("test -f %s" % expected_script)
     assert exit_code == 0
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_init_contains_expected_tools(container_run, expected_tool):
     exit_code, _ = container_run.exec_run("which %s" % expected_tool)
     assert exit_code == 0
 
 
+@pytest.mark.structure
 def test_gerrit_init_has_entrypoint(gerrit_init_image):
     entrypoint = gerrit_init_image.attrs["ContainerConfig"]["Entrypoint"]
     assert len(entrypoint) >= 1
diff --git a/tests/container-images/gerrit-master/test_container_build_gerrit_master.py b/tests/container-images/gerrit-master/test_container_build_gerrit_master.py
index 95ec4b9..6c7c784 100644
--- a/tests/container-images/gerrit-master/test_container_build_gerrit_master.py
+++ b/tests/container-images/gerrit-master/test_container_build_gerrit_master.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_build_gerrit_master(gerrit_master_image, tag_of_cached_container):
     if tag_of_cached_container:
         pytest.skip("Cached image used for testing. Build will not be tested.")
diff --git a/tests/container-images/gerrit-master/test_container_structure_gerrit_master.py b/tests/container-images/gerrit-master/test_container_structure_gerrit_master.py
index d35c8e9..c4b9e68 100755
--- a/tests/container-images/gerrit-master/test_container_structure_gerrit_master.py
+++ b/tests/container-images/gerrit-master/test_container_structure_gerrit_master.py
@@ -22,6 +22,7 @@
     container_run.stop(timeout=1)
 
 
+@pytest.mark.structure
 def test_gerrit_master_inherits_from_gerrit_base(gerrit_master_image):
     contains_tag = False
     for layer in gerrit_master_image.history():
@@ -34,6 +35,7 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_master_contains_start_script(container_run):
     exit_code, _ = container_run.exec_run("test -f /var/tools/start")
     assert exit_code == 0
diff --git a/tests/container-images/gerrit-slave/test_container_build_gerrit_slave.py b/tests/container-images/gerrit-slave/test_container_build_gerrit_slave.py
index 422f197..88fa51c 100644
--- a/tests/container-images/gerrit-slave/test_container_build_gerrit_slave.py
+++ b/tests/container-images/gerrit-slave/test_container_build_gerrit_slave.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_build_gerrit_slave(gerrit_slave_image, tag_of_cached_container):
     if tag_of_cached_container:
         pytest.skip("Cached image used for testing. Build will not be tested.")
diff --git a/tests/container-images/gerrit-slave/test_container_structure_gerrit_slave.py b/tests/container-images/gerrit-slave/test_container_structure_gerrit_slave.py
index 179a93e..2e43077 100755
--- a/tests/container-images/gerrit-slave/test_container_structure_gerrit_slave.py
+++ b/tests/container-images/gerrit-slave/test_container_structure_gerrit_slave.py
@@ -27,6 +27,7 @@
     return request.param
 
 
+@pytest.mark.structure
 def test_gerrit_slave_inherits_from_gerrit_base(gerrit_slave_image):
     contains_tag = False
     for layer in gerrit_slave_image.history():
@@ -39,18 +40,21 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_slave_contains_expected_scripts(container_run, expected_script):
     exit_code, _ = container_run.exec_run("test -f %s" % expected_script)
     assert exit_code == 0
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_slave_contains_initialized_gerrit_site(container_run):
     exit_code, _ = container_run.exec_run("/var/gerrit/bin/gerrit.sh check")
     assert exit_code == 3
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gerrit_slave_gerrit_is_configured_slave(container_run):
     exit_code, output = container_run.exec_run(
         "git config -f /var/gerrit/etc/gerrit.config --get container.slave"
diff --git a/tests/container-images/git-gc/test_container_build_gitgc.py b/tests/container-images/git-gc/test_container_build_gitgc.py
index 8a3a770..a640d20 100644
--- a/tests/container-images/git-gc/test_container_build_gitgc.py
+++ b/tests/container-images/git-gc/test_container_build_gitgc.py
@@ -15,6 +15,7 @@
 import pytest
 
 
+@pytest.mark.structure
 def test_build_gitgc(gitgc_image, tag_of_cached_container):
     if tag_of_cached_container:
         pytest.skip("Cached image used for testing. Build will not be tested.")
diff --git a/tests/container-images/git-gc/test_container_structure_gitgc.py b/tests/container-images/git-gc/test_container_structure_gitgc.py
index 4918115..c088ab0 100644
--- a/tests/container-images/git-gc/test_container_structure_gitgc.py
+++ b/tests/container-images/git-gc/test_container_structure_gitgc.py
@@ -22,6 +22,7 @@
     container_run.stop(timeout=1)
 
 
+@pytest.mark.structure
 def test_gitgc_inherits_from_base(gitgc_image):
     contains_tag = False
     for layer in gitgc_image.history():
@@ -32,17 +33,20 @@
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gitgc_log_dir_writable_by_gerrit(container_run):
     exit_code, _ = container_run.exec_run("touch /var/log/git/test.log")
     assert exit_code == 0
 
 
 @pytest.mark.docker
+@pytest.mark.structure
 def test_gitgc_contains_gc_script(container_run):
     exit_code, _ = container_run.exec_run("test -f /var/tools/gc-all.sh")
     assert exit_code == 0
 
 
+@pytest.mark.structure
 def test_gitgc_has_entrypoint(gitgc_image):
     entrypoint = gitgc_image.attrs["ContainerConfig"]["Entrypoint"]
     assert len(entrypoint) == 1