From: Mike Taylor Date: Tue, 14 Jan 2014 13:13:54 +0000 (+0000) Subject: Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws X-Git-Tag: 1.0.0~1692^2~1 X-Git-Url: http://sru.miketaylor.org.uk/?a=commitdiff_plain;h=6c93b47adb0934752c850b2858f3d20e00100f63;hp=ba61241dc349eaedd8f021735eb75170471771e3;p=mkws-moved-to-github.git Merge branch 'master' of ssh://git.indexdata.com/home/git/private/mkws --- diff --git a/examples/htdocs/jasmine-popup.html b/examples/htdocs/jasmine-popup.html index 6ca6304..d1c2bba 100644 --- a/examples/htdocs/jasmine-popup.html +++ b/examples/htdocs/jasmine-popup.html @@ -28,11 +28,13 @@ diff --git a/examples/htdocs/wolfram.html b/examples/htdocs/wolfram.html index 9c79171..b2983dd 100644 --- a/examples/htdocs/wolfram.html +++ b/examples/htdocs/wolfram.html @@ -8,6 +8,10 @@ diff --git a/test/spec/mkws-pazpar2.js b/test/spec/mkws-pazpar2.js index e017213..67e6f84 100644 --- a/test/spec/mkws-pazpar2.js +++ b/test/spec/mkws-pazpar2.js @@ -161,14 +161,20 @@ describe("Check Termlist", function () { it("limit search to first author", function () { var hits_all_targets = get_hit_counter(); + var author_number = 2; // 2=first author + var author_name = $("div#mkwsFacetAuthors div.term:nth-child(" + author_number + ") a").text(); + // do not click on author with numbers, e.g.: Bower, James M. Beeman, David, 1938- + if (author_name.match(/[0-9].+[0-9]/)) { + author_number++; + } - var click = $("div#mkwsFacetAuthors div.term:nth-child(2) a").trigger("click"); + var click = $("div#mkwsFacetAuthors div.term:nth-child(" + author_number + ") a").trigger("click"); debug("limit author click is success: " + click.length); expect(click.length).toBe(1); waitsFor(function () { return get_hit_counter() < hits_all_targets ? true : false; - }, "Limited author search for less than " + hits_all_targets + " hits", 8 * 1000); + }, "Limited author search for less than " + hits_all_targets + " hits", 6 * 1000); runs(function () { var hits_single_target = get_hit_counter(); @@ -198,8 +204,8 @@ describe("Check Termlist", function () { } }, "Search for source in navi bar", 1000); - // Note: it may happens that limited source search returns the same number of hits - // as before. Thats not really an error, but unfortunate + // Note: it may happens that limited source search returns the same number of hits + // as before. Thats not really an error, but unfortunate waitsFor(function () { return get_hit_counter() <= hits_all_targets ? true : false; }, "Limited source search for less than " + hits_all_targets + " hits", 5 * 1000); diff --git a/tools/bin/nagios-service-proxy.sh b/tools/bin/nagios-service-proxy.sh new file mode 100755 index 0000000..2904e85 --- /dev/null +++ b/tools/bin/nagios-service-proxy.sh @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright (c) 2014 Index Data ApS, http://indexdata.com +# +# nagios test if the the service proxy is up and running + +set -e +: ${mkws_host="http://mkws.indexdata.com/service-proxy/"} +: ${mkws_username="mkws"} +: ${mkws_password="mkws"} +: ${user_agent="nagios service-proxy v0.9"} + +tempfile=$(mktemp) +exit=0 + +url="$mkws_host?command=auth&action=login&username=$mkws_username&password=$mkws_password" +if curl -sSf -A "$user_agent" "$url" > $tempfile; then + if ! egrep -q 'OK' $tempfile; then + echo "status not OK" + exit=1 + fi + if ! egrep -q '