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
changes/26/830926/3
Ian Wienand 7 months ago
parent 9a25740961
commit 25f7403e2a
  1. 5
      docker/hound/sample-projects.yaml
  2. 6
      playbooks/test-codesearch.yaml
  3. 9
      testinfra/test_codesearch.py
  4. 1
      zuul.d/system-config-run.yaml

@ -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"

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

@ -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)

@ -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

Loading…
Cancel
Save