Attribute Macro test_with::http

source ยท
#[http]
Expand description

Run test case when the http service exist.

#[cfg(test)]
mod tests {

    // http service exists
    #[test_with::http(httpbin.org)]
    #[test]
    fn test_works() {
        assert!(true);
    }

    // There is no not.exist.com
    #[test_with::http(not.exist.com)]
    #[test]
    fn test_ignored() {
        panic!("should be ignored")
    }
}