test/shared/spec_helper.rb
# Get value of a specific key for a given OSGi config PID
#
# @param pid [String] PID of OSGi config
# @param key [String] name of configuration key/id
# @return [String] value for a given key
Get value of a specific key for a given OSGi config PID
Get value of a specific key for a given OSGi config PID
def config_value(pid, key)
    require 'json'
    raw_json = `/opt/scripts/CQ-Unix-Toolkit/cqcfg \
     -u admin \
     -p admin \
     -i http://localhost:4502 \
     -j #{pid}`
    out = JSON.parse(raw_json)['properties'][key]['value']
    out = JSON.parse(raw_json)['properties'][key]['values'] if out.nil?
    out
  end
def config_value ( pid , key ) require 'json' raw_json = ` /opt/scripts/CQ-Unix-Toolkit/cqcfg  \
      -u admin  \
      -p admin  \
      -i http://localhost:4502  \
      -j  #{ pid } ` out = JSON . parse ( raw_json ) [ 'properties' ] [ key ] [ 'value' ] out = JSON . parse ( raw_json ) [ 'properties' ] [ key ] [ 'values' ] if out . nil? out end
Get value of a specific key for a given OSGi config PID
Get value of a specific key for a given OSGi config PID
value for a given key
value for a given key
String
pid
PID of OSGi config
PID of OSGi config
key
name of configuration key/id
name of configuration key / id