Bug 29957: Add --keep-cookie option to koha-create
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Fri, 25 Mar 2022 08:20:46 +0000 (08:20 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Tue, 12 Apr 2022 09:40:17 +0000 (11:40 +0200)
commit1e32b6bc44d4a97854f89b38d7bbb5c40ea70f6a
tree4a1ff98c8a327ed9110ee316ef8ad777f63efc19
parentbc75c5acf2947aa1e9d45b77aa9fd213164c9173
Bug 29957: Add --keep-cookie option to koha-create

As requested on comment99. Personally I do not feel that it
should be a requirement for adding a koha-conf entry though.
Note that koha-create does/did not even support adding multiple
line entries to koha-conf like we do here now.
But it might be a start for adding them?

Test plan:
The following tweak might help you to test without running the
complete koha-create, while still convincing you:

[1] cp debian/templates/koha-conf-site.xml.in /etc/koha/test.conf
[2] Add the following line in debian/scripts/koha-create. Append
    if after the BCRYPT_SETTINGS= line on L652:
    generate_config_file test.conf test.xml; exit
[3] Run debian/scripts/koha-create --keep-cookie A
[4] Check if you see <do_not_remove_cookie>A<..> in test.xml.
[5] Run debian/scripts/koha-create --keep-cookie A --keep-cookie B
[6] Check for two lines in test.xml
[7] Run debian/scripts/koha-create clone_name
[8] Check that the __KEEP_COOKIE__ line is gone in test.xml.
[9] Undo the tweak by removing test.xml and /etc/koha/test.conf,
    and removing the added line from koha-create.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
debian/scripts/koha-create
debian/templates/koha-conf-site.xml.in