gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 231/282: ci/tests: fix escaping of testnames and disable proxy f


From: gnunet
Subject: [gnurl] 231/282: ci/tests: fix escaping of testnames and disable proxy for CI APIs
Date: Wed, 01 Apr 2020 14:31:36 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

commit e7c144f1d1ba8e26eb3c044597cd7a1ffe8959bb
Author: Marc Hoersken <address@hidden>
AuthorDate: Tue Mar 3 20:05:58 2020 +0100

    ci/tests: fix escaping of testnames and disable proxy for CI APIs
    
    Follow up to ada581f and c0d8b96
    Closes #5031
---
 tests/appveyor.pm | 11 +++++++----
 tests/azure.pm    | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/tests/appveyor.pm b/tests/appveyor.pm
index 6ed83dd22..4906d2c8c 100644
--- a/tests/appveyor.pm
+++ b/tests/appveyor.pm
@@ -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'
             }
diff --git a/tests/azure.pm b/tests/azure.pm
index 94fe995d9..9dcb56c78 100644
--- a/tests/azure.pm
+++ b/tests/azure.pm
@@ -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 "

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]