-
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
first step for basic test of simple http configuration
This showed an issue with remote name handling as well which needs fixing once remote names are affecting the configuration.
- Loading branch information
Showing
9 changed files
with
115 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
mod config_snapshot; | ||
mod identity; | ||
mod remote; | ||
#[cfg(any(feature = "blocking-network-client", feature = "async-network-client"))] | ||
mod transport_config; |
34 changes: 34 additions & 0 deletions
34
git-repository/tests/repository/config/transport_config.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#[cfg(feature = "blocking-http-transport")] | ||
mod http { | ||
use git_repository as git; | ||
|
||
fn base_repo_path() -> String { | ||
git::path::realpath( | ||
git_testtools::scripted_fixture_repo_read_only("make_remote_repos.sh") | ||
.unwrap() | ||
.join("base"), | ||
) | ||
.unwrap() | ||
.to_string_lossy() | ||
.into_owned() | ||
} | ||
|
||
pub(crate) fn repo(name: &str) -> git::Repository { | ||
let dir = git_testtools::scripted_fixture_repo_read_only_with_args("make_fetch_repos.sh", [base_repo_path()]) | ||
.unwrap(); | ||
git::open_opts(dir.join(name), git::open::Options::isolated()).unwrap() | ||
} | ||
|
||
#[test] | ||
#[ignore] | ||
fn simple_configuration() { | ||
let repo = repo("http-config"); | ||
let http_config = repo | ||
.transport_config("https://example.com/does/not/matter") | ||
.expect("valid configuration") | ||
.expect("configuration available for http"); | ||
let _options = http_config | ||
.downcast_ref::<git_transport::client::http::Options>() | ||
.expect("http options have been created"); | ||
} | ||
} |