hound: enable detect-ref

The dependent change enables the "detect-ref" option of hound, which
looks at the remote origin HEAD and indexes on that.  That should
allow indexing of our mixed repos that have a mix of "master" and
"main".

Add cirros to the test, which should exercise this path, and take some
screenshosts because this a js/react app and just a "curl" doesn't
help.

Change-Id: I1850577c63566b594f9730f5b8f0bc10b07ff7e4
Depends-On: https://review.opendev.org/c/opendev/jeepyb/+/830919
This commit is contained in:
Ian Wienand 2022-02-25 13:54:41 +11:00
parent 9a25740961
commit 25f7403e2a
4 changed files with 21 additions and 0 deletions

View File

@ -13,3 +13,8 @@
groups:
- zuul
description: The Gatekeeper, or a project gating system
- project: cirros/cirros
use-storyboard: false
groups:
- openstack-ci
description: Cirros uses "main" instead of "master"

View File

@ -0,0 +1,6 @@
- hosts: "codesearch"
tasks:
- name: Run selenium container
include_role:
name: run-selenium

View File

@ -12,6 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
from util import take_screenshots
testinfra_hosts = ['codesearch01.opendev.org']
@ -31,3 +32,11 @@ def test_codesearch_robots(host):
'--resolve codesearch.opendev.org:443:127.0.0.1 '
'https://codesearch.opendev.org/robots.txt')
assert 'Disallow: /' in cmd.stdout
def test_codesearch_screenshots(host):
shots = (
('https://localhost/', None, 'codesearch-main-page.png'),
('https://localhost/?q=zuul&i=nope&literal=nope&files=&excludeFiles=&repos=', None, 'codesearch-zuul.png'),
('https://localhost/?q=cirros&i=nope&literal=nope&files=&excludeFiles=&repos=cirros/cirros', None, 'codesearch-cirros.png'),
)
take_screenshots(host, shots)

View File

@ -530,6 +530,7 @@
run_playbooks:
- playbooks/letsencrypt.yaml
- playbooks/service-codesearch.yaml
run_test_playbook: playbooks/test-codesearch.yaml
files:
- playbooks/bootstrap-bridge.yaml
- playbooks/letsencrypt.yaml