@@ -132,26 +132,6 @@ func TestTools(t *testing.T) {
132
132
t .Fatalf ("expected %d == %d (%s)" , len (installed ), 0 , "len(installed)" )
133
133
}
134
134
135
- // Install a tool by specifying url and checksum
136
- _ , err = service .Install (ctx , & tools.ToolPayload {
137
- Packager : "arduino" ,
138
- Name : "avrdude" ,
139
- Version : "6.0.1-arduino2" ,
140
- URL : strpoint (url ()),
141
- Checksum : strpoint (checksum ()),
142
- })
143
- if err != nil {
144
- t .Fatal (err )
145
- }
146
-
147
- installed , err = service .Installed (ctx )
148
- if err != nil {
149
- t .Fatal (err )
150
- }
151
- if len (installed ) != 1 {
152
- t .Fatalf ("expected %d == %d (%s)" , len (installed ), 1 , "len(installed)" )
153
- }
154
-
155
135
t .Run ("payload containing evil names" , func (t * testing.T ) {
156
136
evilFileNames := []string {
157
137
"/" ,
@@ -183,27 +163,3 @@ func TestTools(t *testing.T) {
183
163
func strpoint (s string ) * string {
184
164
return & s
185
165
}
186
-
187
- func url () string {
188
- urls := map [string ]string {
189
- "linuxamd64" : "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-x86_64-pc-linux-gnu.tar.bz2" ,
190
- "linux386" : "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i686-pc-linux-gnu.tar.bz2" ,
191
- "darwinamd64" : "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i386-apple-darwin11.tar.bz2" ,
192
- "windows386" : "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i686-mingw32.zip" ,
193
- "windowsamd64" : "https://downloads.arduino.cc/tools/avrdude-6.0.1-arduino2-i686-mingw32.zip" ,
194
- }
195
-
196
- return urls [runtime .GOOS + runtime .GOARCH ]
197
- }
198
-
199
- func checksum () string {
200
- checksums := map [string ]string {
201
- "linuxamd64" : "SHA-256:2489004d1d98177eaf69796760451f89224007c98b39ebb5577a9a34f51425f1" ,
202
- "linux386" : "SHA-256:6f633dd6270ad0d9ef19507bcbf8697b414a15208e4c0f71deec25ef89cdef3f" ,
203
- "darwinamd64" : "SHA-256:71117cce0096dad6c091e2c34eb0b9a3386d3aec7d863d2da733d9e5eac3a6b1" ,
204
- "windows386" : "SHA-256:6c5483800ba753c80893607e30cade8ab77b182808fcc5ea15fa3019c63d76ae" ,
205
- "windowsamd64" : "SHA-256:6c5483800ba753c80893607e30cade8ab77b182808fcc5ea15fa3019c63d76ae" ,
206
- }
207
- return checksums [runtime .GOOS + runtime .GOARCH ]
208
-
209
- }
0 commit comments