Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
support config file parameter
Browse files Browse the repository at this point in the history
Change-Id: I3aa6f48d55577cbfebb24944aa3b7d6f7ba40637
Signed-off-by: michael zhang <zhangcheng@rbcon.com>
Reviewed-on: http://reviews.cloudfoundry.org/7827
Tested-by: CI Master <cf-ci@rbcon.com>
Reviewed-by: Pin Xie <pxie@vmware.com>
  • Loading branch information
michael zhang committed Jul 27, 2012
1 parent 94cb3e4 commit ab189cb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -55,6 +55,7 @@ Notes:
|SERVICE_BROKER_TOKEN |service broker token |SERVICE_BROKER_TOKEN=<token> |
|SERVICE_BROKER_URL |service broker url |SERVICE_BROKER_URL=http://... |
|VCAP_BVT_LONGEVITY |run testing N times |VCAP_BVT_LONGEVITY=100 |
|VCAP_BVT_CONFIG_FILE |specify config file |VCAP_BVT_CONFIG_FILE=***/config.yml |
```

2. In order to support parallel running, and administrative test cases, Yeti will ask administrative
Expand Down
7 changes: 5 additions & 2 deletions Rakefile
Expand Up @@ -10,8 +10,11 @@ task :help do
puts "Usage: rake [command]"
puts " admin\t\trun admin test cases"
puts " tests\t\trun core tests in parallel, e.g. rake test[5] (default to 10, max = 16)\n"
puts " \t\tOptions: VCAP_BVT_LONGEVITY=N can loop this task (similiar to other tasks)\n"
puts " \t\te.g. rake tests VCAP_BVT_LONGEVITY=10, rake ruby[4] VCAP_BVT_LONGEVITY=10"
puts " \t\tOptions: VCAP_BVT_LONGEVITY=N can loop this task.\n"
puts " \t\te.g. rake tests[8] VCAP_BVT_LONGEVITY=10"
puts " \t\tVCAP_BVT_CONFIG_FILE=[path_to_config_file] to specify config file.\n"
puts " \t\te.g. rake tests VCAP_BVT_CONFIG_FILE=/home/czhang/my_test.yml\n"
puts " \t\tAbove options are also usable in other tasks."
puts " full\t\trun full tests in parallel, e.g. rake full[5] (default to 10, max = 16)"
puts " random\trun all bvts randomly, e.g. rake random[1023] to re-run seed 1023"
puts " java\t\trun java tests (spring, java_web) in parallel\n" +
Expand Down
2 changes: 1 addition & 1 deletion lib/harness.rb
Expand Up @@ -9,7 +9,7 @@ module Harness
VCAP_BVT_HOME = File.join(ENV['HOME'], '.bvt')
end

VCAP_BVT_CONFIG_FILE = File.join(VCAP_BVT_HOME, "config.yml")
VCAP_BVT_CONFIG_FILE = ENV['VCAP_BVT_CONFIG_FILE'] || File.join(VCAP_BVT_HOME, "config.yml")
VCAP_BVT_PROFILE_FILE = File.join(VCAP_BVT_HOME, "profile.yml")
VCAP_BVT_ERROR_LOG = File.join(VCAP_BVT_HOME, "error.log")

Expand Down
4 changes: 3 additions & 1 deletion lib/harness/app.rb
Expand Up @@ -285,8 +285,10 @@ def get_response(method, relative_path = "/", data = nil, second_domain = nil)
raise RuntimeError, "REST method #{method} is not supported"
end

path = relative_path.start_with?("/") ? relative_path : "/" + relative_path

easy = Curl::Easy.new
easy.url = get_url(second_domain) + relative_path
easy.url = get_url(second_domain) + path
easy.resolve_mode = :ipv4
begin
case method
Expand Down

0 comments on commit ab189cb

Please sign in to comment.