[Idea] Running PageScriptingTests and BCPT with selfhosted Containers #2001
ChrisBlankDe
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
Hi @ChrisBlankDe. Sorry for the delay :) This sounds like a good idea to us! So, if you're still up for contributing this we would be open to that 👍 So, the scope of this would be the following:
I'm not completely sure I understand why creating a separate function for page scripting tests that can be overwritten solves the issue with $createContainer 🤔 Could you elaborate on that? But overall, it sounds good. Let us know if you need any assistance from our side. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Idea Description
We want to allow running Page Scripting Tests in a self-hosted (Alpaca) container.
We are currently facing several problems:
(1) First, the pipeline failes ("... not supported on cloud pipelines yet") when you define PageScripting tests and set the AuthContext. We use the Auth Context to pass the container's credentials through the process.
See: https://github.com/microsoft/navcontainerhelper/blob/4c298652c5db938cc25ba6fe4e7c2519c49628bd/AppHandling/Run-AlPipeline.ps1#L841-L857
(2) Secondly, the Page Scripting Tests are only executed if the container itself was created ($createContainer).
See: https://github.com/microsoft/navcontainerhelper/blob/4c298652c5db938cc25ba6fe4e7c2519c49628bd/AppHandling/Run-AlPipeline.ps1#L2881
Case 1 could be solved by analyzing the bcauthcontext more deeply before automatically concluding that a SaaS environment is being used. For this purpose, one could use, for example, the scopes (https://api.businesscentral.dynamics.com/) or the audience (https://api.businesscentral.dynamics.com) Claim of the jwt. (The same applies to the bcpt tests)
For case 2, “Running Page Scripting Tests” should be outsourced to a function that can be overwritten. “Running BCPT tests” can serve as a blueprint for this.
Contribution (Optional)
Beta Was this translation helpful? Give feedback.
All reactions