ci/tests: fix escaping of testnames and disable proxy for CI APIs

Follow up to ada581f and c0d8b96
Closes #5031
This commit is contained in:
Marc Hoersken 2020-03-03 20:05:58 +01:00
parent e4b4ccbc67
commit e7c144f1d1
No known key found for this signature in database
GPG Key ID: 61E03CBED7BC859E
2 changed files with 14 additions and 8 deletions

View File

@ -35,8 +35,11 @@ sub appveyor_check_environment {
sub appveyor_create_test_result {
my ($testnum, $testname)=@_;
$testname =~ s/\\/\\\\/g;
$testname =~ s/\'/\\\'/g;
$testname =~ s/\"/\\\"/g;
my $appveyor_baseurl="$ENV{'APPVEYOR_API_URL'}";
my $appveyor_result=`curl --silent \\
my $appveyor_result=`curl --silent --noproxy "*" \\
--header "Content-Type: application/json" \\
--data "
{
@ -80,7 +83,7 @@ sub appveyor_update_test_result {
$appveyor_category = 'Error';
}
my $appveyor_baseurl="$ENV{'APPVEYOR_API_URL'}";
my $appveyor_result=`curl --silent --request PUT \\
my $appveyor_result=`curl --silent --noproxy "*" --request PUT \\
--header "Content-Type: application/json" \\
--data "
{
@ -94,11 +97,11 @@ sub appveyor_update_test_result {
"$appveyor_baseurl/api/tests"`;
print $appveyor_result;
if($appveyor_category eq 'Error') {
$appveyor_result=`curl --silent \\
$appveyor_result=`curl --silent --noproxy "*" \\
--header "Content-Type: application/json" \\
--data "
{
'message': '$testname',
'message': '$testname $appveyor_outcome',
'category': '$appveyor_category',
'details': 'Test $testnum $appveyor_outcome'
}

View File

@ -38,7 +38,7 @@ sub azure_check_environment {
sub azure_create_test_run {
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
my $azure_run=`curl --silent \\
my $azure_run=`curl --silent --noproxy "*" \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "
@ -57,8 +57,11 @@ sub azure_create_test_run {
sub azure_create_test_result {
my ($azure_run_id, $testnum, $testname)=@_;
$testname =~ s/\\/\\\\/g;
$testname =~ s/\'/\\\'/g;
$testname =~ s/\"/\\\"/g;
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
my $azure_result=`curl --silent \\
my $azure_result=`curl --silent --noproxy "*" \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "
@ -101,7 +104,7 @@ sub azure_update_test_result {
$azure_outcome = 'Failed';
}
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
my $azure_result=`curl --silent --request PATCH \\
my $azure_result=`curl --silent --noproxy "*" --request PATCH \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "
@ -125,7 +128,7 @@ sub azure_update_test_result {
sub azure_update_test_run {
my ($azure_run_id)=@_;
my $azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
my $azure_run=`curl --silent --request PATCH \\
my $azure_run=`curl --silent --noproxy "*" --request PATCH \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "