Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packaging Unit Tests doubles the source path in the export #361

Open
mattreengage opened this issue Dec 5, 2022 · 0 comments
Open

Packaging Unit Tests doubles the source path in the export #361

mattreengage opened this issue Dec 5, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mattreengage
Copy link

When packaging an app with a unit test defined as results in Unit Tests that will not run outside of the developer namespace.

zpm "test myapp -v"

`Load of directory started on 12/06/2022 09:18:01
Loading file /prod/iris/mgr/.modules/DEPOLY/myapp/1.0.3/tests/tests/UnitTest/Module2.cls as cls
Imported class: UnitTest.Module2
Load finished successfully.

Compilation started on 12/06/2022 09:18:01 with qualifiers 'ckd'
Compiling class UnitTest.Module2
Compiling routine UnitTest.Module2.1
Compilation finished successfully in 0.018s.

(root) begins ...
LogStateStatus:0:Finding directories: ERROR #5007: Directory name '/prod/iris/mgr/.modules/DEPOLY/myapp/1.0.3/tests/UnitTest/' is invalid <<==== FAILED (root)::
(root) failed`

Running zpm "package myapp -v" shows the issue is in the packaging phase:
Exporting 'UnitTest.Module2.cls' to '/prod/iris/mgr/Temp/dirOUhCWa/myapp-1.0.3/tests/tests/UnitTest/Module2.cls'

Updating %ZPM.PackageManager.Developer.Processor.Default.Package method OnItemRelativePath
from:
} else { Set tSourceRoot = ..Directory }

to:
} else { Set tSourceRoot = "" }

results in the expected export path and tests that run in both the developer and deployment namespaces

@isc-rkuszews isc-rkuszews added the bug Something isn't working label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants