@@ -215,7 +215,7 @@ def test_install_git_url_and_zip_path_flags_visibility(run_command, data_dir, do
215
215
assert "--git-url and --zip-path flags allow installing untrusted files, use it at your own risk." in res .stdout
216
216
217
217
218
- def test_install_with_git_url (run_command , data_dir , downloads_dir ):
218
+ def test_install_with_git_url_https (run_command , data_dir , downloads_dir ):
219
219
# Initialize configs to enable --git-url flag
220
220
env = {
221
221
"ARDUINO_DATA_DIR" : data_dir ,
@@ -236,6 +236,27 @@ def test_install_with_git_url(run_command, data_dir, downloads_dir):
236
236
assert "Error installing Git Library: repository already exists" in res .stderr
237
237
238
238
239
+ def test_install_with_git_url_ssh (run_command , data_dir , downloads_dir ):
240
+ # Initialize configs to enable --git-url flag
241
+ env = {
242
+ "ARDUINO_DATA_DIR" : data_dir ,
243
+ "ARDUINO_DOWNLOADS_DIR" : downloads_dir ,
244
+ "ARDUINO_SKETCHBOOK_DIR" : data_dir ,
245
+ "ARDUINO_ENABLE_UNSAFE_LIBRARY_INSTALL" : "true" ,
246
+ }
247
+ assert run_command ("config init --dest-dir ." , custom_env = env )
248
+
249
+ # Test git-url library install
250
+ res = run_command (
"lib install --git-url [email protected] :arduino-libraries/WiFi101.git" )
251
+ assert res .ok
252
+ assert "--git-url and --zip-path flags allow installing untrusted files, use it at your own risk." in res .stdout
253
+
254
+ # Test failing-install as repository already exists
255
+ res = run_command (
"lib install --git-url [email protected] :arduino-libraries/WiFi101.git" )
256
+ assert "--git-url and --zip-path flags allow installing untrusted files, use it at your own risk." in res .stdout
257
+ assert "Error installing Git Library: repository already exists" in res .stderr
258
+
259
+
239
260
def test_install_with_zip_path (run_command , data_dir , downloads_dir ):
240
261
# Initialize configs to enable --zip-path flag
241
262
env = {
0 commit comments