@@ -63,11 +63,11 @@ class PiperGoUtilsTest extends BasePiperTest {
63
63
})
64
64
65
65
shellCallRule. setReturnValue(' [ -x ./piper ]' , 1 )
66
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 200' )
66
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 200' )
67
67
68
68
piperGoUtils. unstashPiperBin()
69
69
assertThat (shellCallRule. shell. size(), is(4 ))
70
- assertThat (shellCallRule. shell[1 ]. toString(), is(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' ))
70
+ assertThat (shellCallRule. shell[1 ]. toString(), is(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' ))
71
71
assertThat (shellCallRule. shell[2 ]. toString(), is(' chmod +x piper' ))
72
72
assertThat (shellCallRule. shell[3 ]. toString(), is(' ./piper version' ))
73
73
}
@@ -84,11 +84,11 @@ class PiperGoUtilsTest extends BasePiperTest {
84
84
})
85
85
86
86
shellCallRule. setReturnValue(' [ -x ./piper ]' , 1 )
87
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/testTag/piper\' ' , ' 200' )
87
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/testTag/piper\' ' , ' 200' )
88
88
89
89
piperGoUtils. unstashPiperBin()
90
90
assertThat (shellCallRule. shell. size(), is(4 ))
91
- assertThat (shellCallRule. shell[1 ]. toString(), is(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/testTag/piper\' ' ))
91
+ assertThat (shellCallRule. shell[1 ]. toString(), is(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/testTag/piper\' ' ))
92
92
assertThat (shellCallRule. shell[2 ]. toString(), is(' chmod +x piper' ))
93
93
assertThat (shellCallRule. shell[3 ]. toString(), is(' ./piper version' ))
94
94
}
@@ -101,8 +101,8 @@ class PiperGoUtilsTest extends BasePiperTest {
101
101
102
102
shellCallRule. setReturnValue(' [ -x ./piper ]' , 1 )
103
103
shellCallRule. setReturnValue(' ./piper version' , " 1.2.3" )
104
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' , ' 404' )
105
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 200' )
104
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' , ' 404' )
105
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 200' )
106
106
107
107
// this mocks utils.unstash - mimic stash not existing
108
108
helper. registerAllowedMethod(" unstash" , [String . class], { stashFileName ->
@@ -112,8 +112,8 @@ class PiperGoUtilsTest extends BasePiperTest {
112
112
piperGoUtils. unstashPiperBin()
113
113
assertThat (shellCallRule. shell. size(), is(5 ))
114
114
assertThat (shellCallRule. shell[0 ]. toString(), is(' [ -x ./piper ]' ))
115
- assertThat (shellCallRule. shell[1 ]. toString(), is(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' ))
116
- assertThat (shellCallRule. shell[2 ]. toString(), is(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' ))
115
+ assertThat (shellCallRule. shell[1 ]. toString(), is(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' ))
116
+ assertThat (shellCallRule. shell[2 ]. toString(), is(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' ))
117
117
assertThat (shellCallRule. shell[3 ]. toString(), is(' chmod +x piper' ))
118
118
assertThat (shellCallRule. shell[4 ]. toString(), is (' ./piper version' ))
119
119
}
@@ -124,8 +124,8 @@ class PiperGoUtilsTest extends BasePiperTest {
124
124
piperGoUtils. metaClass. getLibrariesInfo = {-> return [[name : ' piper-lib-os' , version : ' notAvailable' ]]}
125
125
126
126
shellCallRule. setReturnValue(' [ -x ./piper ]' , 1 )
127
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' , ' 404' )
128
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 500' )
127
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' , ' 404' )
128
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 500' )
129
129
130
130
helper. registerAllowedMethod(" unstash" , [String . class], { stashFileName ->
131
131
return []
@@ -141,8 +141,8 @@ class PiperGoUtilsTest extends BasePiperTest {
141
141
piperGoUtils. metaClass. getLibrariesInfo = {-> return [[name : ' piper-lib-os' , version : ' notAvailable' ]]}
142
142
143
143
shellCallRule. setReturnValue(' [ -x ./piper ]' , 1 )
144
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' , ' 404' )
145
- shellCallRule. setReturnValue(' curl --insecure -- silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 500' )
144
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/download/notAvailable/piper\' ' , ' 404' )
145
+ shellCallRule. setReturnValue(' curl --silent --retry 5 --retry-max-time 240 --location --write-out \' %{http_code}\' --output piper \' https://github.com/SAP/jenkins-library/releases/latest/download/piper\' ' , ' 500' )
146
146
147
147
helper. registerAllowedMethod(" unstash" , [String . class], { stashFileName ->
148
148
return []
0 commit comments