Also add curl oneliner to submit the current git head to developer-run-tests
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>
[true, 'Bearer configuredmanagementtoken', 200, '{"health":"OK"}'],
].each do |enabled, header, error_code, error_msg|
test "ping when #{if enabled then 'enabled' else 'disabled' end} with header '#{header}'" do
[true, 'Bearer configuredmanagementtoken', 200, '{"health":"OK"}'],
].each do |enabled, header, error_code, error_msg|
test "ping when #{if enabled then 'enabled' else 'disabled' end} with header '#{header}'" do
- Rails.configuration.ManagementToken = 'configuredmanagementtoken' if enabled
+ if enabled
+ Rails.configuration.ManagementToken = 'configuredmanagementtoken'
+ else
+ Rails.configuration.ManagementToken = ""
+ end
@request.headers['Authorization'] = header
get :ping
@request.headers['Authorization'] = header
get :ping
require 'integration_helper'
class AnonymousAccessTest < ActionDispatch::IntegrationTest
require 'integration_helper'
class AnonymousAccessTest < ActionDispatch::IntegrationTest
- include KeepWebConfig
-
# These tests don't do state-changing API calls. Save some time by
# skipping the database reset.
reset_api_fixtures :after_each_test, false
# These tests don't do state-changing API calls. Save some time by
# skipping the database reset.
reset_api_fixtures :after_each_test, false
require_relative 'integration_test_utils'
class CollectionsTest < ActionDispatch::IntegrationTest
require_relative 'integration_test_utils'
class CollectionsTest < ActionDispatch::IntegrationTest
- include KeepWebConfig
-
setup do
need_javascript
end
setup do
need_javascript
end
require 'helpers/download_helper'
class DownloadTest < ActionDispatch::IntegrationTest
require 'helpers/download_helper'
class DownloadTest < ActionDispatch::IntegrationTest
- include KeepWebConfig
-
@@wrote_test_data = false
setup do
@@wrote_test_data = false
setup do
require 'integration_helper'
class JobsTest < ActionDispatch::IntegrationTest
require 'integration_helper'
class JobsTest < ActionDispatch::IntegrationTest
- include KeepWebConfig
-
setup do
need_javascript
end
setup do
need_javascript
end
-module KeepWebConfig
- def getport service
- File.read(File.expand_path("../../../../tmp/#{service}.port", __FILE__))
- end
-
- def use_keep_web_config
- @kwport = getport 'keep-web-ssl'
- @kwdport = getport 'keep-web-dl-ssl'
- Rails.configuration.Services.WebDAV.ExternalURL = URI("https://localhost:#{@kwport}")
- Rails.configuration.Services.WebDAVDownload.ExternalURL = URI("https://localhost:#{@kwdport}")
- end
-end
-
class ActionDispatch::IntegrationTest
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
class ActionDispatch::IntegrationTest
# Make the Capybara DSL available in all integration tests
include Capybara::DSL
[true, 'Bearer configuredmanagementtoken', 200, '{"health":"OK"}'],
].each do |enabled, header, error_code, error_msg|
test "ping when #{if enabled then 'enabled' else 'disabled' end} with header '#{header}'" do
[true, 'Bearer configuredmanagementtoken', 200, '{"health":"OK"}'],
].each do |enabled, header, error_code, error_msg|
test "ping when #{if enabled then 'enabled' else 'disabled' end} with header '#{header}'" do
- Rails.configuration.ManagementToken = 'configuredmanagementtoken' if enabled
+ if enabled
+ Rails.configuration.ManagementToken = 'configuredmanagementtoken'
+ else
+ Rails.configuration.ManagementToken = ""
+ end
@request.headers['Authorization'] = header
get :ping
@request.headers['Authorization'] = header
get :ping
+ "git.curoverse.com/arvados.git/lib/config"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"git.curoverse.com/arvados.git/sdk/go/arvadostest"
check "gopkg.in/check.v1"
"git.curoverse.com/arvados.git/sdk/go/arvados"
"git.curoverse.com/arvados.git/sdk/go/arvadostest"
check "gopkg.in/check.v1"
func (*GitMountSuite) useTestGitServer(c *check.C) {
git_client.InstallProtocol("https", git_http.NewClient(arvados.InsecureHTTPClient))
func (*GitMountSuite) useTestGitServer(c *check.C) {
git_client.InstallProtocol("https", git_http.NewClient(arvados.InsecureHTTPClient))
- port, err := ioutil.ReadFile("../../tmp/arv-git-httpd-ssl.port")
+ loader := config.NewLoader(nil, nil)
+ cfg, err := loader.Load()
c.Assert(err, check.IsNil)
c.Assert(err, check.IsNil)
- discoveryMap["gitUrl"] = "https://localhost:" + string(port)
+ cluster, err := cfg.GetCluster("")
+ c.Assert(err, check.IsNil)
+
+ discoveryMap["gitUrl"] = (*url.URL)(&cluster.Services.GitHTTP.ExternalURL).String()
--- /dev/null
+#!/bin/sh
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+head=$(git log --first-parent --max-count=1 --format=%H)
+curl -X POST https://ci.curoverse.com/job/developer-run-tests/build \
+ --user $(cat ~/.jenkins.ci.curoverse.com) \
+ --data-urlencode json='{"parameter": [{"name":"git_hash", "value":"'$head'"}]}'