Переглянути джерело

Updated tests with better names.

I've set local-httpbin as default feature so vscode highlights it.
And, so it runs by default now.
Steve Thielemann 2 тижнів тому
батько
коміт
60949816b2
2 змінених файлів з 7 додано та 5 видалено
  1. 1 0
      Cargo.toml
  2. 6 5
      src/cache.rs

+ 1 - 0
Cargo.toml

@@ -10,6 +10,7 @@ reqwest = { version = "0.12.15", features = ["blocking", "brotli", "deflate", "g
 url = "2.5.4"
 
 [features]
+default = ["local-httpbin"]
 local-httpbin = []
 
 [dev-dependencies]

+ 6 - 5
src/cache.rs

@@ -586,7 +586,7 @@ mod tests {
     use testdir::testdir;
 
     #[test]
-    fn relative_test() {
+    fn relative_url_test() {
         let rel_abs: HashMap<(&str, &str), &str> = HashMap::from([
             (
                 ("http://meow.org/rabbit", "/llama/index.html"),
@@ -667,8 +667,8 @@ mod tests {
     }
 
     #[test]
-    #[cfg(not(feature = "local-httpbin"))]
-    fn cache_fetch() {
+    // #[cfg(not(feature = "local-httpbin"))]
+    fn remote_test() {
         let mut dir = testdir!();
         dir.push("cache");
 
@@ -702,6 +702,7 @@ mod tests {
     /*
     Add to Config.toml:
     [features]
+    default = ["local-httpbin"]
     local-httpbin = []
 
     Use:
@@ -716,7 +717,7 @@ mod tests {
 
     #[test]
     #[cfg(feature = "local-httpbin")]
-    fn call_local() {
+    fn local_httpbin_test() {
         let mut dir = testdir!();
         dir.push("cache");
 
@@ -773,7 +774,7 @@ mod tests {
 
     #[test]
     #[cfg(feature = "local-httpbin")]
-    fn cache_local() {
+    fn local_httpbin_cache_test() {
         let mut dir = testdir!();
         dir.push("cache");