1. 13 Oct, 2021 1 commit
  2. 04 Jun, 2021 3 commits
  3. 29 Mar, 2021 1 commit
    • Jérome Perrin's avatar
      slapos.cookbook test: use environment variables to pass eggs directories · 56a2d7a4
      Jérome Perrin authored
      slapos.cookbook recipe tests sometimes manipulate buildout eggs working set,
      which will install packages from pypi. makeRecipe utilty function was
      guessing buildout egg folders by parsing builout.cfg, but since a33844a2
      (slapos-testing, slapos-sr-testing: Don't duplicate instance.cfg prologue
      that is already provided by stack/nxdtest/instance.cfg, 2021-03-22),
      these are defined in an extended profile, so this stopped working.
      
      Instead of this fragile pattern, make the test software release pass the eggs
      directories with an explicit environment variable.
      56a2d7a4
  4. 24 Feb, 2021 1 commit
  5. 22 Feb, 2021 1 commit
  6. 02 Dec, 2020 1 commit
  7. 26 Nov, 2020 1 commit
  8. 24 Apr, 2020 1 commit
  9. 08 Apr, 2020 2 commits
  10. 30 Aug, 2019 2 commits
  11. 28 Aug, 2019 1 commit
    • Jérome Perrin's avatar
      test.utils.makeRecipe: support running from software folder · 74a50d0a
      Jérome Perrin authored
      Now that we also run slapos.cookbook tests from SLAPOS-SR-TEST we cannot
      simply examine buildout.cfg, because unlike SLAPOS-EGG-TEST this
      repository is now checked out in parts of the software folder, not the
      instance folder.
      So that trick of looking up the egg directories in buildout does not
      work, because this is a software buildout.cfg ... instead, we assume
      that the standard eggs and develop-eggs directories are used.
      74a50d0a
  12. 02 Aug, 2019 1 commit
  13. 20 Feb, 2019 1 commit
  14. 18 Feb, 2019 1 commit
    • Alain Takoudjou's avatar
      plugin recipe: improve recipe to correctly generate promise which has complex parameters · b53ba563
      Alain Takoudjou authored
      
      Use json.dumps/.loads to generate promise plugin code. This is safe as it will correctly escape sring and prevent code injection from untrustable parameters.
      
      Add 'import' parameter to simplify parameters used to generate the script instead of passing full import code. When import parameter is set, promise will be loaded from that import path and parameter `content` is ignored.
      
      /reviewed-on !515
      b53ba563
  15. 27 Dec, 2018 1 commit
  16. 26 Nov, 2018 1 commit
  17. 03 Sep, 2018 2 commits
  18. 31 Aug, 2018 2 commits
  19. 27 Apr, 2018 1 commit
    • Jérome Perrin's avatar
      userinfo: expose values as string · f06e61a6
      Jérome Perrin authored
      To be compatible with buildout (and not only `slapos.recipe.template:jinja2`)
      
      See [#20180416-1138FFA](https://nexedi.erp5.net/bug_module/20180416-1138FFA/)
      
      ---
      
      Running this buildout:
      
      ```
      [buildout]
      parts=x
      
      [userinfo]
      recipe = slapos.cookbook:userinfo
      
      [x]
      recipe = plone.recipe.command
      command = echo "Hello user id ${userinfo:pw-uid}"
      ```
      
      
      In a slapos patched buildout it outputs: `"Hello user id !py!991"` (which means it's not usable for references directly in other buildout parts)
      
      In a "non patched" buildout fail with error:
      
      ```
      While:
        Installing.
        Getting section x.
        Initializing section x.
        Getting option x:command.
        Getting section userinfo.
        Initializing section userinfo.
      
      An internal error occurred due to a bug in either zc.buildout or in a
      recipe being used:
      Traceback (most recent call last):
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2127, in main
          getattr(buildout, command)(args)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 681, in install
          [self[part]['recipe'] for part in install_parts]
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1278, in __getitem__
          options._initialize()
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1376, in _initialize
          self._dosub(k, v)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1431, in _dosub
          v = '$$'.join([self._sub(s, seen) for s in v.split('$$')])
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1495, in _sub
          v = self.buildout[section].get(option, None, seen)
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1278, in __getitem__
          options._initialize()
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1386, in _initialize
          self.initialize()
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1395, in initialize
          self.recipe = recipe_class(buildout, name, self)
        File "/tmp/x/eggs/slapos.cookbook-1.0.62-py2.7.egg/slapos/recipe/userinfo.py", line 13, in __init__
          options['pw-uid'] = pinfo.pw_uid
        File "/tmp/x/env/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1520, in __setitem__
          raise TypeError('Option values must be strings', value)
      TypeError: ('Option values must be strings', 991)
      ```
      
      /cc @Nicolas @alain.takoudjou  @vpelletier 
      
      /reviewed-on !321
      f06e61a6
  20. 04 Apr, 2018 1 commit
    • Jérome Perrin's avatar
      test: introduce makeRecipe utility function · f8df048c
      Jérome Perrin authored
      This function factorize the code to instanciate a recipe in a fake
      buildout.
      The new feature is that if running in a buildout directory, the recipe
      will reuse the eggs from this buildout instead of trying to install eggs
      again.
      f8df048c
  21. 12 Mar, 2018 1 commit
  22. 13 Feb, 2018 1 commit
  23. 14 Nov, 2017 1 commit
  24. 02 Oct, 2017 2 commits
  25. 13 Jun, 2017 2 commits
  26. 21 Mar, 2017 1 commit
  27. 24 Jan, 2017 2 commits
  28. 30 Dec, 2016 1 commit
  29. 15 Nov, 2016 1 commit
  30. 21 Oct, 2016 1 commit
  31. 17 Oct, 2016 1 commit