changeset 2555:502f52bb0f6c

Tests: removed leftover engine checks.
author Dmitry Volyntsev <xeioex@nginx.com>
date Mon, 19 May 2025 18:53:00 -0700
parents 577aabf66722
children 8cc5011c3f73
files nginx/t/js_fetch.t nginx/t/js_fetch_https.t nginx/t/js_fetch_objects.t nginx/t/js_fetch_resolver.t nginx/t/js_fetch_timeout.t nginx/t/js_fetch_verify.t nginx/t/js_periodic_fetch.t nginx/t/js_shared_dict.t nginx/t/stream_js_fetch.t nginx/t/stream_js_fetch_https.t nginx/t/stream_js_fetch_init.t nginx/t/stream_js_periodic_fetch.t nginx/t/stream_js_shared_dict.t
diffstat 13 files changed, 13 insertions(+), 117 deletions(-) [+]
line wrap: on
line diff
--- a/nginx/t/js_fetch.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_fetch.t	Mon May 19 18:53:00 2025 -0700
@@ -52,10 +52,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /broken {
             js_content test.broken;
         }
@@ -138,10 +134,6 @@
         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 @@
 
      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');
--- a/nginx/t/js_fetch_https.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_fetch_https.t	Mon May 19 18:53:00 2025 -0700
@@ -48,10 +48,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /https {
             js_content test.https;
         }
@@ -106,10 +102,6 @@
         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 @@
         .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();
--- a/nginx/t/js_fetch_objects.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_fetch_objects.t	Mon May 19 18:53:00 2025 -0700
@@ -45,10 +45,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /headers {
             js_content test.headers;
         }
@@ -92,10 +88,6 @@
         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 @@
         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
 
--- a/nginx/t/js_fetch_resolver.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_fetch_resolver.t	Mon May 19 18:53:00 2025 -0700
@@ -50,10 +50,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /dns {
             js_content test.dns;
 
@@ -108,10 +104,6 @@
         r.return(200, njs.version);
     }
 
-    function engine(r) {
-        r.return(200, njs.engine);
-    }
-
     const p0 = $p0;
     const p1 = $p1;
 
@@ -141,7 +133,7 @@
         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');
--- a/nginx/t/js_fetch_timeout.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_fetch_timeout.t	Mon May 19 18:53:00 2025 -0700
@@ -47,10 +47,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /normal_timeout {
             js_content test.timeout_test;
         }
@@ -84,10 +80,6 @@
         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 @@
         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
 
--- a/nginx/t/js_fetch_verify.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_fetch_verify.t	Mon May 19 18:53:00 2025 -0700
@@ -48,10 +48,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /https {
             js_content test.https;
         }
@@ -80,10 +76,6 @@
         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 @@
         .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);
--- a/nginx/t/js_periodic_fetch.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_periodic_fetch.t	Mon May 19 18:53:00 2025 -0700
@@ -54,10 +54,6 @@
             js_periodic test.fetch_exception interval=1s;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /fetch_ok {
             return 200 'ok';
         }
@@ -81,10 +77,6 @@
 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 @@
     }
 
     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');
--- a/nginx/t/js_shared_dict.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/js_shared_dict.t	Mon May 19 18:53:00 2025 -0700
@@ -52,10 +52,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /add {
             js_content test.add;
         }
@@ -141,10 +137,6 @@
         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 @@
 
     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');
--- a/nginx/t/stream_js_fetch.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/stream_js_fetch.t	Mon May 19 18:53:00 2025 -0700
@@ -46,10 +46,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /validate {
             js_content test.validate;
         }
@@ -103,10 +99,6 @@
         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 @@
     }
 
     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');
--- a/nginx/t/stream_js_fetch_https.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/stream_js_fetch_https.t	Mon May 19 18:53:00 2025 -0700
@@ -47,10 +47,6 @@
         location /njs {
             js_content test.njs;
         }
-
-        location /engine {
-            js_content test.engine;
-        }
     }
 
     server {
@@ -163,10 +159,6 @@
         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 @@
         (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();
--- a/nginx/t/stream_js_fetch_init.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/stream_js_fetch_init.t	Mon May 19 18:53:00 2025 -0700
@@ -58,10 +58,6 @@
             js_content test.njs;
         }
 
-        location /engine {
-            js_content test.engine;
-        }
-
         location /success {
             return 200;
         }
@@ -77,17 +73,13 @@
         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');
--- a/nginx/t/stream_js_periodic_fetch.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/stream_js_periodic_fetch.t	Mon May 19 18:53:00 2025 -0700
@@ -67,10 +67,6 @@
         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 @@
 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 @@
         });
     }
 
-    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));
--- a/nginx/t/stream_js_shared_dict.t	Mon May 19 14:58:12 2025 -0700
+++ b/nginx/t/stream_js_shared_dict.t	Mon May 19 18:53:00 2025 -0700
@@ -43,10 +43,6 @@
         location / {
             return 200;
         }
-
-        location /engine {
-            js_content test.engine;
-        }
     }
 }
 
@@ -75,10 +71,6 @@
 $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 @@
         });
     }
 
-    export default { engine, preread_verify, control_access };
+    export default { preread_verify, control_access };
 
 EOF