3 # Exercise addition of pmwebd Access-Control-Allow-Origin HTTP header.
5 # Copyright (c) 2014 Red Hat.
9 echo "QA output created by $seq"
12 which pmwebd
>/dev
/null
2>&1 || _notrun
"pmwebd not installed"
13 which curl
>/dev
/null
2>&1 || _notrun
"No curl binary installed"
15 signal
=$PCP_BINADM_DIR/pmsignal
16 status
=1 # failure is the default!
18 $sudo rm -rf $tmp.
* $seq.full
19 trap "cd $here; _cleanup; exit \$status" 0 1 2 3 15
23 [ -z "$webpid" ] ||
$signal $webpid
30 webport
=`_find_free_port`
32 # real QA test starts here
33 pmwebd
-U $username -P -l $tmp.out
-p $webport 2>$tmp.err
&
35 _wait_for_pmwebd
$webport
37 echo "pmwebd pid=$webpid port=$webport" >>$seq.full
38 curl
-s -S "http://localhost:$webport/pmapi/context?local=anything" -D- 2>&1 | _webapi_header_filter
40 echo "--- pmwebd log ---" >>$seq.full
41 cat $tmp.out
>>$seq.full
42 echo "--- pmwebd stderr ---" >>$seq.full
43 cat $tmp.err
>>$seq.full