Skip to content

Commit

Permalink
Merge pull request #2192 from Ana06/config_url
Browse files Browse the repository at this point in the history
[ci] Avoid using localhost:3200 in test
  • Loading branch information
Moisés Déniz Alemán committed Oct 4, 2016
2 parents db0fe45 + c6e97fc commit 14b18be
Show file tree
Hide file tree
Showing 7 changed files with 228 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/config/environments/test.rb
Expand Up @@ -57,7 +57,7 @@

CONFIG['source_host'] = "localhost"
CONFIG['source_port'] = 3200
CONFIG['url'] = "http://#{CONFIG['source_host']}:#{CONFIG['source_port']}"
CONFIG['source_url'] = "http://#{CONFIG['source_host']}:#{CONFIG['source_port']}"

CONFIG['response_schema_validation'] = true

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/api/spec/controllers/webui/package_controller_spec.rb
Expand Up @@ -527,7 +527,7 @@ def remove_file_post
end

context 'with right params' do
let(:post_url) { "#{CONFIG['url']}/source/#{source_project}/#{service_package}?cmd=runservice&user=#{user}" }
let(:post_url) { "#{CONFIG['source_url']}/source/#{source_project}/#{service_package}?cmd=runservice&user=#{user}" }

before do
get :trigger_services, params: { project: source_project, package: service_package }
Expand All @@ -539,7 +539,7 @@ def remove_file_post
end

context "without a service file in the package" do
let(:post_url) { "#{CONFIG['url']}/source/#{source_project}/#{source_package}?cmd=runservice&user=#{user}" }
let(:post_url) { "#{CONFIG['source_url']}/source/#{source_project}/#{source_package}?cmd=runservice&user=#{user}" }

before do
get :trigger_services, params: { project: source_project, package: source_package }
Expand Down
2 changes: 1 addition & 1 deletion src/api/spec/features/webui/packages_spec.rb
Expand Up @@ -101,7 +101,7 @@
context "triggering package rebuild" do
let(:repository) { create(:repository, architectures: ["x86_64"]) }
let(:rebuild_url) {
"http://localhost:3200/build/#{user.home_project.name}?cmd=rebuild&arch=x86_64&package=#{package.name}&repository=#{repository.name}"
"#{CONFIG['source_url']}/build/#{user.home_project.name}?cmd=rebuild&arch=x86_64&package=#{package.name}&repository=#{repository.name}"
}
let(:fake_buildresult) {
"<resultlist state='123'>
Expand Down
2 changes: 1 addition & 1 deletion src/api/spec/models/package_spec.rb
Expand Up @@ -36,7 +36,7 @@

context '#delete_file' do
let(:package_with_file) { create(:package_with_file, name: 'package_with_files', project: home_project)}
let(:url) { "http://localhost:3200/source/#{home_project.name}/#{package_with_file.name}" }
let(:url) { "#{CONFIG['source_url']}/source/#{home_project.name}/#{package_with_file.name}" }

before do
User.current = user
Expand Down
2 changes: 1 addition & 1 deletion src/api/spec/models/service_spec.rb
Expand Up @@ -6,7 +6,7 @@
let(:home_project) { user.home_project }
let(:package) { create(:package, name: 'test_package', project: home_project) }
let(:service) { package.services }
let(:url) { "http://localhost:3200/source/#{home_project.name}/#{package.name}" }
let(:url) { "#{CONFIG['source_url']}/source/#{home_project.name}/#{package.name}" }

context '#addKiwiImport' do
before do
Expand Down

0 comments on commit 14b18be

Please sign in to comment.