Skip to content

Commit

Permalink
Remove test_ from test function names
Browse files Browse the repository at this point in the history
  • Loading branch information
autarch committed Dec 26, 2024
1 parent aa7ecd5 commit 31009e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions ubi/src/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,23 @@ mod tests {

#[test(tokio::test)]
#[serial]
async fn test_fetch_assets_without_token() -> Result<()> {
test_fetch_assets(None, None).await
async fn fetch_assets_without_token() -> Result<()> {
fetch_assets(None, None).await
}

#[test(tokio::test)]
#[serial]
async fn test_fetch_assets_with_token() -> Result<()> {
test_fetch_assets(None, Some("ghp_fakeToken")).await
async fn fetch_assets_with_token() -> Result<()> {
fetch_assets(None, Some("ghp_fakeToken")).await
}

#[test(tokio::test)]
#[serial]
async fn test_fetch_assets_with_tag() -> Result<()> {
test_fetch_assets(Some("v1.0.0"), None).await
async fn fetch_assets_with_tag() -> Result<()> {
fetch_assets(Some("v1.0.0"), None).await
}

async fn test_fetch_assets(tag: Option<&str>, token: Option<&str>) -> Result<()> {
async fn fetch_assets(tag: Option<&str>, token: Option<&str>) -> Result<()> {
let vars = env::vars();
env::remove_var("GITHUB_TOKEN");

Expand Down
14 changes: 7 additions & 7 deletions ubi/src/gitlab.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,23 @@ mod tests {

#[test(tokio::test)]
#[serial]
async fn test_fetch_assets_without_token() -> Result<()> {
test_fetch_assets(None, None).await
async fn fetch_assets_without_token() -> Result<()> {
fetch_assets(None, None).await
}

#[test(tokio::test)]
#[serial]
async fn test_fetch_assets_with_token() -> Result<()> {
test_fetch_assets(None, Some("glpat-fakeToken")).await
async fn fetch_assets_with_token() -> Result<()> {
fetch_assets(None, Some("glpat-fakeToken")).await
}

#[test(tokio::test)]
#[serial]
async fn test_fetch_assets_with_tag() -> Result<()> {
test_fetch_assets(Some("v1.0.0"), None).await
async fn fetch_assets_with_tag() -> Result<()> {
fetch_assets(Some("v1.0.0"), None).await
}

async fn test_fetch_assets(tag: Option<&str>, token: Option<&str>) -> Result<()> {
async fn fetch_assets(tag: Option<&str>, token: Option<&str>) -> Result<()> {
let vars = env::vars();
env::remove_var("GITLAB_TOKEN");
env::remove_var("CI_JOB_TOKEN");
Expand Down

0 comments on commit 31009e7

Please sign in to comment.