diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-06-21 16:18:22 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-06-21 16:25:55 +0200 |
commit | 719991b78af9ac6915179209771be4138065e182 (patch) | |
tree | d254892b578d9e7685d08822e4b05802614e8807 /tests | |
parent | abeb43732a2a9b45453e6acb6df3de2395659943 (diff) |
Use a cargo feature to allow disabling docker tests in CI
Ideally these tests would run in CI, but that would require docker in docker,
since CI runs its tests in docker.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/server_shell.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/server_shell.rs b/tests/server_shell.rs index 22f3d3b..806f901 100644 --- a/tests/server_shell.rs +++ b/tests/server_shell.rs @@ -164,6 +164,7 @@ fn make_new_shared_repo(c: &TestContext, group: &str, repo_name: &str) -> Result } #[test] +#[cfg_attr(not(feature = "docker_tests"), ignore)] fn shows_a_prompt() -> Result<()> { let c = spawn_ssh_server()?; connect_to_ssh_server_interactively(&c)?; @@ -237,6 +238,7 @@ fn commit_dummy_content(c: &TestContext, repo_name: &str) -> Result<()> { } #[test] +#[cfg_attr(not(feature = "docker_tests"), ignore)] fn git_clone_works_with_an_empty_repo() -> Result<()> { let c = spawn_ssh_server()?; let repo_name = "my-new-clonable-repo"; @@ -247,6 +249,7 @@ fn git_clone_works_with_an_empty_repo() -> Result<()> { } #[test] +#[cfg_attr(not(feature = "docker_tests"), ignore)] fn git_push_works() -> Result<()> { let c = spawn_ssh_server()?; let repo_name = "my-new-pushable-repo"; @@ -259,6 +262,7 @@ fn git_push_works() -> Result<()> { } #[test] +#[cfg_attr(not(feature = "docker_tests"), ignore)] fn git_clone_works_with_an_empty_shared_repo() -> Result<()> { let c = spawn_ssh_server()?; let repo_name = "my-new-clonable-repo"; @@ -270,6 +274,7 @@ fn git_clone_works_with_an_empty_shared_repo() -> Result<()> { } #[test] +#[cfg_attr(not(feature = "docker_tests"), ignore)] fn git_push_works_with_shared_repo() -> Result<()> { let c = spawn_ssh_server()?; let repo_name = "my-new-pushable-repo"; @@ -283,6 +288,7 @@ fn git_push_works_with_shared_repo() -> Result<()> { } #[test] +#[cfg_attr(not(feature = "docker_tests"), ignore)] fn git_clone_can_not_target_repo_outside_allowed_paths() -> Result<()> { fn test_git_clone_unallowed_path(repo_name: &str) -> Result<()> { let c = spawn_ssh_server()?; @@ -319,6 +325,7 @@ fn init_local_git_dir(c: &TestContext, repo_name: &str) { } #[test] +#[cfg_attr(not(feature = "docker_tests"), ignore)] fn git_push_can_not_target_repo_outside_allowed_paths() -> Result<()> { fn test_push_to_unallowed_path(repo_name: &str) -> Result<()> { let c = spawn_ssh_server()?; |