I finally figured this out with a help of a colleague! I just had to create a user that I can use for authentication in publish operation. AFAICS now everything works as expected.

The difference in authentication of zpm-registry's /package and /packages paths confused me untiI I read the source code.

Essentially my problem here was this was the first time I run into these web applications and IRIS authentication model.

Thanks for asking - I have not yet solved this (I have prioritized other things).

The overall work flow is clear but I'm struggling with this step on self-hosted remote registry:

repo -n local -r -url http://localhost:52773/registry/ -user test -pass PassWord42

How do I configure the authentication? I.e. how do I know the values for -user and -pass? AFAIK this is explained nowhere.

A side note for the community registry:

I recall I have seen the instructions how to self-register to the community registry (probably written by you 😉) but I didn't saved the link and now I can't find it anymore.

I'm expecting the front page at:

https://pm.community.intersystems.com/

would have clear description and instructions in the the similar way than the official (?) registry:

https://pm.intersystems.com/

Now I have this kind of workaround:

<!-- unit testing workaround -->
<Invoke Phase="Test" Class="Company.UnitTest.IPM" Method="Load" CheckStatus="true">
  <Arg>${root}/test</Arg>
</Invoke>
<Invoke Phase="Test" Class="Company.UnitTest.IPM" Method="RunTestPackage" CheckStatus="true">
  <Arg>CompanyTests</Arg>
</Invoke>
<Invoke Phase="Unconfigure" Class="%SYSTEM.OBJ" Method="DeletePackage" CheckStatus="true">
  <Arg>CompanyTests</Arg>
</Invoke>

The amount of boilerplate is tolerable.

Test cases are located in ${root}/test.

Company.UnitTest.IPM is just an IPM "compatible" facade for our framework.

Now I can run test -o my-company-module. This has been working fine so far, fingers crossed there is no nasty surprises just waiting around the corner ...

I had a look into the IPM source code and I guess the correct places where the testing action happens are:

  • %ZPM.PackageManager.Developer.Processor.UnitTest (OnPhase method)
  • %ZPM.PackageManager.Developer.UnitTest.Manager

However I got a quite confused how I would be able to inject my own Processor.UnitTest and/or UnitTest.Manager there and what are those pParams that are passes everywhere.

Nexus is not listed in https://oras.land/adopters/ but OCI support is mentioned e.g. here: https://www.sonatype.com/blog/sonatype-nexus-repository-as-a-container-r...

Open Container Initiative (OCI) support

Sonatype Nexus Repository supports the Open Container Initiative
for creating open industry standards on container formats and runtime specifications. This lightweight, open governance structure provides guidance and continued growth across all leaders in the container industry.

Yeah, figured it out. The path have to point to either an empty existing directory or to an non-existing directory.

zpm:IPMTEST1>package -verbose -only -path /home/irisowner/module-package/ osex-ipm-hello

[IPMTEST1|osex-ipm-hello]       Package START
Exporting 'OSEX.ipm.hello.Hello.cls' to '/home/irisowner/module-package/src/OSEX/ipm/hello/Hello.cls'
Exported to /home/irisowner/module-package/module.xml
Module exported to:
        /home/irisowner/module-package/

Module package generated:
        /home/irisowner/module-package.tgz

However I see the following problems:

It's undocumented the name of the package is derived from the directory name.

The created directory structure is not cleaned after successful run.

The tar package contains unnecessary directories:

$ tar zvtf module-package.tgz
drwxr-xr-x 0/0               0 2024-10-30 07:51 module-package
drwxrwxr-x 0/0               0 2024-10-30 07:51 src//src
drwxrwxr-x 0/0               0 2024-10-30 07:51 src/OSEX//OSEX
drwxrwxr-x 0/0               0 2024-10-30 07:51 src/OSEX/ipm//ipm
drwxrwxr-x 0/0               0 2024-10-30 07:51 src/OSEX/ipm/hello//hello
-rwxr-xr-x 0/0             111 2024-10-30 07:51 src/OSEX/ipm/hello//Hello.cls
-rwxr-xr-x 0/0             494 2024-10-30 07:51 module.xml

I'm expecting only src/OSEX/ipm/hello directory.

The $system.OBJ.Export documentation doesn't mention LUT. However there is a vague statement:

Each of the items must have a type determined by an extension selected from the following list of basic types, additional types are supported under the abstract routine interface, so this list is not exhaustive.

Is LUT one of those additional types? What is that abstract routine interface? Why it is not possible to list those additional types here too?

Just for the record the types mentioned in the documentation at the moment of writing:

  • CLS - Classes
  • CSP - Server Pages
  • CSR - Rule files
  • MAC - Macro routines
  • INT - Non-macro routines
  • BAS - Basic routines
  • INC - Include files
  • GBL - Globals
  • PRJ - Projects
  • OBJ - Compiled object code
  • PKG - Package definitions

This is ObjectScript only. The other unit testing framework is in-house developed non-public xUnit like unit testing framework. It was developed before %UnitTest exists and I'm just wondering would it be possible to use TestCoverage with it. Unfortunately my ObjectScript skills are still lacking so it's a bit hard for me to figure that out from the code. The long term goal might be to try to adjust these two things to work together.

i was inspired by your post as I have an idea to use ObjectScript code to control WireMock during unit testing. So I checked the documentation of  Ens.Util.Pipe to notice it's not much help for me :(

So let's ask from community AI: https://community.intersystems.com/ask-dc-ai?question_id=242465

how i can use Ens.Util.Pipe to run a command line program?

I got answer that seems to do the job (I don't know, I haven't tried it yet, but bookmarked) but it doesn't help me with the Ens.Util.Pipe class.

Let's try another way: https://community.intersystems.com/ask-dc-ai?question_id=242514

show me an example how to use RunCommand class method of Ens.Util.Pipe class

This is beyond my current knowledge. Please ask the Developer Community for further assistance.

So in this case the AI tool is not yet a magical replacement for missing/lacking documentation :(