<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/test, branch 1.33.0-1</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>tests: Suppress cargo-component output</title>
<updated>2024-09-10T00:12:29+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-09-06T15:28:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=cff5e092afec17c73a0f94d75276500fd9da8403'/>
<id>cff5e092afec17c73a0f94d75276500fd9da8403</id>
<content type='text'>
Suppress the output from cargo-component when we first run it to check
if it's available, otherwise you may see the following

  $ pytest test/test_wasm-wasi-component.py
  which: no go in (/home/andrew/.local/bin:/home/andrew/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
  error: no such command: `component`

  	View all installed commands with `cargo --list`
  	Find a package to install `component` with `cargo search cargo-component

Note: This didn't stop the tests from working, just an aesthetic issue.

Closes: https://github.com/nginx/unit/issues/1410
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suppress the output from cargo-component when we first run it to check
if it's available, otherwise you may see the following

  $ pytest test/test_wasm-wasi-component.py
  which: no go in (/home/andrew/.local/bin:/home/andrew/bin:/usr/share/Modules/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin)
  error: no such command: `component`

  	View all installed commands with `cargo --list`
  	Find a package to install `component` with `cargo search cargo-component

Note: This didn't stop the tests from working, just an aesthetic issue.

Closes: https://github.com/nginx/unit/issues/1410
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix routing tests in the no njs case</title>
<updated>2024-09-10T00:12:29+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-09-06T15:24:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=6976a614d782d13e14c6c8e446ce521c47f02b58'/>
<id>6976a614d782d13e14c6c8e446ce521c47f02b58</id>
<content type='text'>
Don't try and run the tests that require njs if it isn't enabled.

Closes: https://github.com/nginx/unit/issues/1411
Fixes: 43c4bfdcd ("tests: "if" option in http route match")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't try and run the tests that require njs if it isn't enabled.

Closes: https://github.com/nginx/unit/issues/1411
Fixes: 43c4bfdcd ("tests: "if" option in http route match")
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>java: Update third-party components</title>
<updated>2024-09-07T17:21:35+00:00</updated>
<author>
<name>Sergey A. Osokin</name>
<email>osa@FreeBSD.org.ru</email>
</author>
<published>2024-09-07T15:43:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=27d3a5c7c0d9b9fc03b69871aea6b3c9ab16aaa0'/>
<id>27d3a5c7c0d9b9fc03b69871aea6b3c9ab16aaa0</id>
<content type='text'>
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Tweaked subject - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/wasm-wc: Rename test_wasm_component.py</title>
<updated>2024-08-28T21:18:37+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-08-26T14:53:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=19cd88ef907a3a9248d58a987070f18749ff874b'/>
<id>19cd88ef907a3a9248d58a987070f18749ff874b</id>
<content type='text'>
Rename this to 'test_wasm-wasi-component.py' to match the language
module name and the name as used in the CI.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename this to 'test_wasm-wasi-component.py' to match the language
module name and the name as used in the CI.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>test/wasm-wc: Target wasm32-wasip1</title>
<updated>2024-08-28T21:18:37+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-08-27T05:47:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=264f4af44c1d054b6d676877c53ae163a7da7055'/>
<id>264f4af44c1d054b6d676877c53ae163a7da7055</id>
<content type='text'>
Changes are afoot... wasm32-wasi has been renamed wasm32-wasip1, there
is also a wasm32-wasip2 (seems not yet fully realised) and wasm32-wasi
is being kept clear for an eventual WASI 1.0 release.

cargo-component targets wasm32-wasip1 by default and adapts the module
to the preview2 version of WASI supported by the component model.

This means that the component is now found under
target/wasm32-wasip1/...

Link: &lt;https://doc.rust-lang.org/nightly/rustc/platform-support/wasm32-wasip1.html&gt;
Link: &lt;https://github.com/bytecodealliance/cargo-component/blob/main/README.md#wasi-support&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes are afoot... wasm32-wasi has been renamed wasm32-wasip1, there
is also a wasm32-wasip2 (seems not yet fully realised) and wasm32-wasi
is being kept clear for an eventual WASI 1.0 release.

cargo-component targets wasm32-wasip1 by default and adapts the module
to the preview2 version of WASI supported by the component model.

This means that the component is now found under
target/wasm32-wasip1/...

Link: &lt;https://doc.rust-lang.org/nightly/rustc/platform-support/wasm32-wasip1.html&gt;
Link: &lt;https://github.com/bytecodealliance/cargo-component/blob/main/README.md#wasi-support&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix `/status' endpoint to cater for lists</title>
<updated>2024-08-28T21:12:45+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2024-07-23T17:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f4298f94292b99e7f384f8048e695b8263d495f2'/>
<id>f4298f94292b99e7f384f8048e695b8263d495f2</id>
<content type='text'>
We can now get list objects from the /status endpoint in the case of
having different versions of the same language module.

That led to this error

  &gt;       return d1 - d2
  E       TypeError: unsupported operand type(s) for -: 'list' and 'list'

We already cover a similar case for when we have simple strings so add
this to that.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can now get list objects from the /status endpoint in the case of
having different versions of the same language module.

That led to this error

  &gt;       return d1 - d2
  E       TypeError: unsupported operand type(s) for -: 'list' and 'list'

We already cover a similar case for when we have simple strings so add
this to that.

Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Tests: initial "wasm-wasi-component" test</title>
<updated>2024-08-20T18:38:51+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2024-05-17T16:42:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=cad6aed526b38d52f13266120f9a4381f9a22cad'/>
<id>cad6aed526b38d52f13266120f9a4381f9a22cad</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: "if" option in http route match</title>
<updated>2024-08-20T01:17:24+00:00</updated>
<author>
<name>Zhidao HONG</name>
<email>z.hong@f5.com</email>
</author>
<published>2024-08-18T14:49:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=43c4bfdcd1e925e5ec06e59b86a884279947671d'/>
<id>43c4bfdcd1e925e5ec06e59b86a884279947671d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Fix `/status' endpoint tests for new 'modules' section</title>
<updated>2024-07-12T15:44:54+00:00</updated>
<author>
<name>Andrei Zeliankou</name>
<email>zelenkov@nginx.com</email>
</author>
<published>2024-07-03T16:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f4ba4b5583cef182ad29cc158e8b1e2965b09829'/>
<id>f4ba4b5583cef182ad29cc158e8b1e2965b09829</id>
<content type='text'>
Now that the `/status` endpoint returns a list of loaded language
modules, e.g

  {
      "modules": {
          "python": {
              "version": "3.12.2",
              "lib": "/opt/unit/modules/python.unit.so"
          },

	  ...
      ...
  }

This broke 'test/test_status.py' in a number of ways

  1) The check for all the object values being 0 at startup is no longer
     true with the modules section.

  2) The find_diffs() check broke trying to subtract strings from
     strings.

So don't include the 'modules' section in the check_zeros() check and in
the find_diffs() check, if we're dealing with strings do a basic
compare returning that value instead.

[ Commit message - Andrew ]
Co-developed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that the `/status` endpoint returns a list of loaded language
modules, e.g

  {
      "modules": {
          "python": {
              "version": "3.12.2",
              "lib": "/opt/unit/modules/python.unit.so"
          },

	  ...
      ...
  }

This broke 'test/test_status.py' in a number of ways

  1) The check for all the object values being 0 at startup is no longer
     true with the modules section.

  2) The find_diffs() check broke trying to subtract strings from
     strings.

So don't include the 'modules' section in the check_zeros() check and in
the find_diffs() check, if we're dealing with strings do a basic
compare returning that value instead.

[ Commit message - Andrew ]
Co-developed-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Add tests for python application factories</title>
<updated>2024-07-02T18:13:14+00:00</updated>
<author>
<name>Gourav</name>
<email>gouravkandoria1500@gmail.com</email>
</author>
<published>2024-06-26T06:37:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=d67d350142d4ef9a9cdbfc2bb4a6b2d8f261deb1'/>
<id>d67d350142d4ef9a9cdbfc2bb4a6b2d8f261deb1</id>
<content type='text'>
Add the following tests cases:

1. When "factory" key is used inside the "targets" option.
2. When "factory" key is used at the root level of python application
   config.
3. When factory returns invalid callable or When factory is invalid
   callable

Link: &lt;https://github.com/nginx/unit/pull/1336&gt;
[ Commit subject &amp; message formatting tweaks - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add the following tests cases:

1. When "factory" key is used inside the "targets" option.
2. When "factory" key is used at the root level of python application
   config.
3. When factory returns invalid callable or When factory is invalid
   callable

Link: &lt;https://github.com/nginx/unit/pull/1336&gt;
[ Commit subject &amp; message formatting tweaks - Andrew ]
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
