diff --git a/docker/gerrit/bazel/Dockerfile b/docker/gerrit/bazel/Dockerfile index 7d57eae165..5c1db52c55 100644 --- a/docker/gerrit/bazel/Dockerfile +++ b/docker/gerrit/bazel/Dockerfile @@ -23,6 +23,7 @@ RUN mkdir /var/gerrit/plugins && \ # NOTE(ianw) : copied into build context by playbooks/zuul/gerrit/run.yaml COPY plugins/opendevtheme.html /var/gerrit/plugins/opendevtheme.html -COPY static/ /var/gerrit/ +# Copy copies only the contents of a directory not the directory itself. +COPY static/ /var/gerrit/static/ COPY bazel-bin/plugins/zuul-results-summary/zuul-results-summary.jar /var/gerrit/plugins/zuul-results-summary.jar diff --git a/testinfra/test_gerrit.py b/testinfra/test_gerrit.py index c18a0759d1..fd9218bb19 100644 --- a/testinfra/test_gerrit.py +++ b/testinfra/test_gerrit.py @@ -50,3 +50,18 @@ def test_gerrit_screenshot(host): ) take_screenshots(host, shots) + +def test_opendev_logo(host): + cmd = host.run('curl --head --insecure ' + '--resolve review.opendev.org:443:127.0.0.1 ' + 'https://review.opendev.org/static/opendev-sm.png') + assert '200 OK' in cmd.stdout + assert 'Content-Type: image/png' in cmd.stdout + +def test_openstack_cla(host): + cmd = host.run('curl --include --insecure ' + '--resolve review.opendev.org:443:127.0.0.1 ' + 'https://review.opendev.org/static/cla.html') + assert '200 OK' in cmd.stdout + assert 'Content-Type: text/html' in cmd.stdout + assert 'OpenStack Project Individual Contributor License Agreement' in cmd.stdout