details:   
https://github.com/nginx/njs/commit/a340ad8f7d9bd5ee1bfb7e6d76f56e845fe002f3
branches:  master
commit:    a340ad8f7d9bd5ee1bfb7e6d76f56e845fe002f3
user:      Dmitry Volyntsev <xei...@nginx.com>
date:      Mon, 19 May 2025 18:53:00 -0700
description:
Tests: removed leftover engine checks.


---
 nginx/t/js_fetch.t                 | 10 +---------
 nginx/t/js_fetch_https.t           | 10 +---------
 nginx/t/js_fetch_objects.t         | 10 +---------
 nginx/t/js_fetch_resolver.t        | 10 +---------
 nginx/t/js_fetch_timeout.t         | 10 +---------
 nginx/t/js_fetch_verify.t          | 10 +---------
 nginx/t/js_periodic_fetch.t        | 10 +---------
 nginx/t/js_shared_dict.t           | 10 +---------
 nginx/t/stream_js_fetch.t          | 10 +---------
 nginx/t/stream_js_fetch_https.t    | 10 +---------
 nginx/t/stream_js_fetch_init.t     | 10 +---------
 nginx/t/stream_js_periodic_fetch.t | 10 +---------
 nginx/t/stream_js_shared_dict.t    | 10 +---------
 13 files changed, 13 insertions(+), 117 deletions(-)

diff --git a/nginx/t/js_fetch.t b/nginx/t/js_fetch.t
index 7ee1a602..1c6fde77 100644
--- a/nginx/t/js_fetch.t
+++ b/nginx/t/js_fetch.t
@@ -52,10 +52,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /broken {
             js_content test.broken;
         }
@@ -138,10 +134,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     function body(r) {
         var loc = r.args.loc;
         var getter = r.args.getter;
@@ -408,7 +400,7 @@ $t->write_file('test.js', <<EOF);
 
      export default {njs: test_njs, body, broken, broken_response, 
body_special,
                      chain, chunked_ok, chunked_fail, header, header_iter,
-                     host_header, multi, loc, property, engine};
+                     host_header, multi, loc, property};
 EOF
 
 $t->try_run('no njs.fetch');
diff --git a/nginx/t/js_fetch_https.t b/nginx/t/js_fetch_https.t
index 8ede1048..42b5acbb 100644
--- a/nginx/t/js_fetch_https.t
+++ b/nginx/t/js_fetch_https.t
@@ -48,10 +48,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /https {
             js_content test.https;
         }
@@ -106,10 +102,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     function https(r) {
         var url = `https://\${r.args.domain}:$p1/loc`;
         var opt = {};
@@ -124,7 +116,7 @@ $t->write_file('test.js', <<EOF);
         .catch(e => r.return(501, e.message))
     }
 
-    export default {njs: test_njs, https, engine};
+    export default {njs: test_njs, https};
 EOF
 
 my $d = $t->testdir();
diff --git a/nginx/t/js_fetch_objects.t b/nginx/t/js_fetch_objects.t
index bc5cc7ed..c9d04c49 100644
--- a/nginx/t/js_fetch_objects.t
+++ b/nginx/t/js_fetch_objects.t
@@ -45,10 +45,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /headers {
             js_content test.headers;
         }
@@ -92,10 +88,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     function header(r) {
         r.return(200, r.headersIn.a);
     }
@@ -528,7 +520,7 @@ $t->write_file('test.js', <<EOF);
         run(r, tests);
     }
 
-     export default {njs: test_njs, engine, body, headers, request, response,
+     export default {njs: test_njs, body, headers, request, response,
                      fetch, fetch_multi_header};
 EOF
 
diff --git a/nginx/t/js_fetch_resolver.t b/nginx/t/js_fetch_resolver.t
index 031ff43c..67680283 100644
--- a/nginx/t/js_fetch_resolver.t
+++ b/nginx/t/js_fetch_resolver.t
@@ -50,10 +50,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /dns {
             js_content test.dns;
 
@@ -108,10 +104,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     const p0 = $p0;
     const p1 = $p1;
 
@@ -141,7 +133,7 @@ $t->write_file('test.js', <<EOF);
         r.return(c, 
`\${v.host}:\${v.request_method}:\${foo}:\${bar}:\${body}`);
     }
 
-     export default {njs: test_njs, dns, loc, engine};
+     export default {njs: test_njs, dns, loc};
 EOF
 
 $t->try_run('no njs.fetch');
diff --git a/nginx/t/js_fetch_timeout.t b/nginx/t/js_fetch_timeout.t
index ab1ba24a..2ca1510f 100644
--- a/nginx/t/js_fetch_timeout.t
+++ b/nginx/t/js_fetch_timeout.t
@@ -47,10 +47,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /normal_timeout {
             js_content test.timeout_test;
         }
@@ -84,10 +80,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     async function timeout_test(r) {
         let rs = await Promise.allSettled([
             'http://127.0.0.1:$p1/normal_reply',
@@ -110,7 +102,7 @@ $t->write_file('test.js', <<EOF);
         setTimeout((r) => { r.return(200); }, 250, r, 0);
     }
 
-     export default {njs: test_njs, engine, timeout_test, normal_reply,
+     export default {njs: test_njs, timeout_test, normal_reply,
                      delayed_reply};
 EOF
 
diff --git a/nginx/t/js_fetch_verify.t b/nginx/t/js_fetch_verify.t
index f98b4d8c..8b691a74 100644
--- a/nginx/t/js_fetch_verify.t
+++ b/nginx/t/js_fetch_verify.t
@@ -48,10 +48,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /https {
             js_content test.https;
         }
@@ -80,10 +76,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     function https(r) {
         ngx.fetch(`https://example.com:$p1/loc`)
         .then(reply => reply.text())
@@ -91,7 +83,7 @@ $t->write_file('test.js', <<EOF);
         .catch(e => r.return(501, e.message));
     }
 
-    export default {njs: test_njs, engine, https};
+    export default {njs: test_njs, https};
 EOF
 
 $t->write_file('openssl.conf', <<EOF);
diff --git a/nginx/t/js_periodic_fetch.t b/nginx/t/js_periodic_fetch.t
index 0231b662..a323afb8 100644
--- a/nginx/t/js_periodic_fetch.t
+++ b/nginx/t/js_periodic_fetch.t
@@ -54,10 +54,6 @@ http {
             js_periodic test.fetch_exception interval=1s;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /fetch_ok {
             return 200 'ok';
         }
@@ -81,10 +77,6 @@ EOF
 my $p0 = port(8080);
 
 $t->write_file('test.js', <<EOF);
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     async function fetch() {
         let reply = await ngx.fetch('http://127.0.0.1:$p0/fetch_ok');
         let body = await reply.text();
@@ -116,7 +108,7 @@ $t->write_file('test.js', <<EOF);
     }
 
     export default { fetch, fetch_exception, multiple_fetches, test_fetch,
-                     test_multiple_fetches, engine };
+                     test_multiple_fetches };
 EOF
 
 $t->try_run('no js_periodic with fetch');
diff --git a/nginx/t/js_shared_dict.t b/nginx/t/js_shared_dict.t
index 8be2831f..b27a33ef 100644
--- a/nginx/t/js_shared_dict.t
+++ b/nginx/t/js_shared_dict.t
@@ -52,10 +52,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /add {
             js_content test.add;
         }
@@ -141,10 +137,6 @@ $t->write_file('test.js', <<'EOF');
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     function convertToValue(dict, v) {
         if (dict.type == 'number') {
             return parseInt(v);
@@ -337,7 +329,7 @@ $t->write_file('test.js', <<'EOF');
 
     export default { add, capacity, chain, clear, del, free_space, get, has,
                      incr, items, keys, name, njs: test_njs, pop, replace, set,
-                     set_clear, size, zones, engine, overflow };
+                     set_clear, size, zones, overflow };
 EOF
 
 $t->try_run('no js_shared_dict_zone');
diff --git a/nginx/t/stream_js_fetch.t b/nginx/t/stream_js_fetch.t
index 9a42ae29..cb87eec7 100644
--- a/nginx/t/stream_js_fetch.t
+++ b/nginx/t/stream_js_fetch.t
@@ -46,10 +46,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /validate {
             js_content test.validate;
         }
@@ -103,10 +99,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     function validate(r) {
         r.return((r.requestText == 'QZ') ? 200 : 403);
     }
@@ -166,7 +158,7 @@ $t->write_file('test.js', <<EOF);
     }
 
     export default {njs: test_njs, validate, preread_verify, filter_verify,
-                    access_ok, access_nok, engine};
+                    access_ok, access_nok};
 EOF
 
 $t->try_run('no stream njs available');
diff --git a/nginx/t/stream_js_fetch_https.t b/nginx/t/stream_js_fetch_https.t
index 987a896a..f397ea70 100644
--- a/nginx/t/stream_js_fetch_https.t
+++ b/nginx/t/stream_js_fetch_https.t
@@ -47,10 +47,6 @@ http {
         location /njs {
             js_content test.njs;
         }
-
-        location /engine {
-            js_content test.engine;
-        }
     }
 
     server {
@@ -163,10 +159,6 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     function preread(s) {
         s.on('upload', function (data, flags) {
             if (data.startsWith('GO')) {
@@ -201,7 +193,7 @@ $t->write_file('test.js', <<EOF);
         (r.status == 200) ? s.allow(): s.deny();
     }
 
-    export default {njs: test_njs, engine, preread, access_ok, access_nok};
+    export default {njs: test_njs, preread, access_ok, access_nok};
 EOF
 
 my $d = $t->testdir();
diff --git a/nginx/t/stream_js_fetch_init.t b/nginx/t/stream_js_fetch_init.t
index f48b9d5e..3980a9ee 100644
--- a/nginx/t/stream_js_fetch_init.t
+++ b/nginx/t/stream_js_fetch_init.t
@@ -58,10 +58,6 @@ http {
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /success {
             return 200;
         }
@@ -77,17 +73,13 @@ $t->write_file('test.js', <<EOF);
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     async function access_ok(s) {
         let reply = await ngx.fetch('http://127.0.0.1:$p/success');
 
         (reply.status == 200) ? s.allow(): s.deny();
     }
 
-    export default {njs: test_njs, engine, access_ok};
+    export default {njs: test_njs, access_ok};
 EOF
 
 $t->try_run('no stream njs available');
diff --git a/nginx/t/stream_js_periodic_fetch.t 
b/nginx/t/stream_js_periodic_fetch.t
index 60599423..4ebec96e 100644
--- a/nginx/t/stream_js_periodic_fetch.t
+++ b/nginx/t/stream_js_periodic_fetch.t
@@ -67,10 +67,6 @@ http {
         listen       127.0.0.1:8080;
         server_name  localhost;
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /fetch_ok {
             return 200 'ok';
         }
@@ -86,10 +82,6 @@ EOF
 my $p1 = port(8080);
 
 $t->write_file('test.js', <<EOF);
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     async function fetch() {
         let reply = await ngx.fetch('http://127.0.0.1:$p1/fetch_ok');
         let body = await reply.text();
@@ -142,7 +134,7 @@ $t->write_file('test.js', <<EOF);
         });
     }
 
-    export default { engine, fetch, fetch_exception, test, multiple_fetches };
+    export default { fetch, fetch_exception, test, multiple_fetches };
 EOF
 
 $t->run_daemon(\&stream_daemon, port(8090));
diff --git a/nginx/t/stream_js_shared_dict.t b/nginx/t/stream_js_shared_dict.t
index 915cc40b..0435033d 100644
--- a/nginx/t/stream_js_shared_dict.t
+++ b/nginx/t/stream_js_shared_dict.t
@@ -43,10 +43,6 @@ http {
         location / {
             return 200;
         }
-
-        location /engine {
-            js_content test.engine;
-        }
     }
 }
 
@@ -75,10 +71,6 @@ EOF
 $t->write_file('test.js', <<EOF);
     import qs from 'querystring';
 
-    function engine(r) {
-        r.return(200, 'engine');
-    }
-
     function preread_verify(s) {
         var collect = Buffer.from([]);
 
@@ -121,7 +113,7 @@ $t->write_file('test.js', <<EOF);
         });
     }
 
-    export default { engine, preread_verify, control_access };
+    export default { preread_verify, control_access };
 
 EOF
 
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to