()
| 579 | |
| 580 | #[test] |
| 581 | fn test_git_submodule_skipped_when_disabled() { |
| 582 | // Same repo as test_git_submodule_with_ssh_key: its submodule requires an SSH key. |
| 583 | // With skip_submodules, the clone must succeed without any credentials and |
| 584 | // the submodule directory must stay empty. |
| 585 | let commit_id = "9a9c1f4373c8128151a9def9ea3d838fa2ed33e8"; |
| 586 | let clone_dir = DirectoryForTests::new_with_random_suffix("/tmp/engine_test_submodule_skip".to_string()); |
| 587 | let repo = clone_at_commit( |
| 588 | &Url::parse("https://github.com/Qovery/engine-testing.git").unwrap(), |
| 589 | commit_id, |
| 590 | Path::new(&clone_dir.path), |
| 591 | &|_| Vec::new(), |
| 592 | true, |
| 593 | ); |
| 594 | assert!(repo.is_ok()); |
| 595 | assert!(!PathBuf::from(format!("{}/dumb-logger/README.md", clone_dir.path())).exists()); |
| 596 | |
| 597 | let repo = Repository::open(&clone_dir.path); |
| 598 | assert!(repo.is_ok()); |
| 599 | assert_eq!(repo.unwrap().head().unwrap().target().unwrap().to_string(), commit_id); |
| 600 | } |
| 601 | } |
nothing calls this directly
no test coverage detected