You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Christian Schneider <ch...@die-schneider.net> on 2019/02/07 09:53:33 UTC
How to create a namespace mapping from a remote test?
I would like to reproduce a problem with replication when a namespace is
not present on publish.
So I would like to:
- create a new namespace mapping on author
- Create a node with an attribute that uses the new namespace
- publish the node to author and check if it is correct
I can do all the steps but the namespace mapping creation.
Does anyone know how to do this? I have not found any means on the sling
testing client to do it.
Christian
--
--
Christian Schneider
http://www.liquid-reality.de
Computer Scientist
http://www.adobe.com
Re: How to create a namespace mapping from a remote test?
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Fri, Feb 8, 2019 at 5:14 AM Julian Sedding <js...@gmail.com> wrote:
> ...2. Deploy a custom bundle with a servlet that allows registering a
> namespace...
Yes and you might use tinybundles to create that bundle, to avoid too
complex a setup.
> ...I'm not sure how far the Teleporter junit rule would get you,
> but it may be worth looking into...
Teleported tests run server-side so they can do whatever - and BTW the
sling-org-apache-sling-junit-teleporter uses the tinybundles technique
mentioned above to inject the tests in a Sling instance.
-Bertrand
Re: How to create a namespace mapping from a remote test?
Posted by Julian Sedding <js...@gmail.com>.
Hi Christian
I can see two options. However, both require deploying a custom bundle.
1. The JCR Content Loader has support for installing *.cnd files[0].
I.e. a (very slim) bundle could be installed to register a namespace
declared in a cnd file.
2. Deploy a custom bundle with a servlet that allows registering a
namespace. The servlet could even implement the majority of your test
case. I'm not sure how far the Teleporter junit rule would get you,
but it may be worth looking into.
Regards
Julian
[0] https://sling.apache.org/documentation/bundles/content-loading-jcr-contentloader.html#declared-node-type-registration
On Thu, Feb 7, 2019 at 10:53 AM Christian Schneider
<ch...@die-schneider.net> wrote:
>
> I would like to reproduce a problem with replication when a namespace is
> not present on publish.
>
> So I would like to:
> - create a new namespace mapping on author
> - Create a node with an attribute that uses the new namespace
> - publish the node to author and check if it is correct
>
> I can do all the steps but the namespace mapping creation.
>
> Does anyone know how to do this? I have not found any means on the sling
> testing client to do it.
>
> Christian
>
> --
> --
> Christian Schneider
> http://www.liquid-reality.de
>
> Computer Scientist
> http://www.adobe.com