Sha256: 6adc0c331a3011d44e0245206c3dfbb420185d8bb45fa064e41240aadd14841f
Contents?: true
Size: 1.47 KB
Versions: 26
Compression:
Stored size: 1.47 KB
Contents
require 'rubygems' require 'net/http' require 'json' require 'log4r' require 'lib/depengine/helper/validations' require 'lib/depengine/provider/cdb' require 'lib/depengine/log/log' $log = Log::DeploymentLogger.new $log.level = Log4r::ERROR describe "the cdb backend" do include Provider path = '/INT/dbde/dboverallsearch/port' version = 0 it "should deliver a parameter from the cdb by path" do worker = Provider::CDB.new worker.protocol = 'http' worker.host = 'localhost:4567' worker.context = '' worker.env = 'INT' result = worker.get_parameter('dbde/dboverallsearch/port', 0) result.should include("10123") end it "should deliver all parameters for an app from the cdb by path" do worker = Provider::CDB.new worker.protocol = 'http' worker.host = 'localhost:4567' worker.context = '' worker.env = 'INT' result = worker.get_parameters('dbde/dboverallsearch', 0) result['env'].should include("INT") result['appname'].should include("dboverallsearch") result['port'].should be 10123 end it "should set a parameter in the cdb" do worker = Provider::CDB.new worker.protocol = 'http' worker.host = 'localhost:4567' worker.context = '' worker.env = 'INT' worker.set_parameter('dbde/dboverallsearch', 'deployed_version', 123) result = worker.get_parameter('dbde/dboverallsearch/deployed_version', 0) result.should include("123") end end
Version data entries
26 entries across 26 versions & 1 rubygems