diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/jenkins.rs | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/src/jenkins.rs b/src/jenkins.rs index 2cd4858..67e6c20 100644 --- a/src/jenkins.rs +++ b/src/jenkins.rs @@ -281,6 +281,10 @@ pub fn result_from_job(status: Option<String>) -> JobStatus {      }  } +pub fn jenkins_console_url_path(job_url: &String) -> String { +    format!("{}console", job_url) +} +  fn jenkins_request_client(user_id: &String, token: &String) -> Result<reqwest::Client, Box<Error>> {      let credentials = auth_credentials(user_id.to_owned(), token.to_owned()); @@ -446,4 +450,14 @@ mod tests {              JobStatus::Pending          );      } + +    #[test] +    fn jenkins_console_url_path_returns_url_to_console_page() { +        assert_eq!( +            jenkins_console_url_path( +                &"https://jenkins.example.com/job/changes-branches/15/".to_owned() +            ), +            "https://jenkins.example.com/job/changes-branches/15/console" +        ); +    }  } | 
