Skip to content
Snippets Groups Projects
  1. Jun 13, 2019
  2. Apr 04, 2019
  3. Mar 12, 2019
  4. Jan 23, 2019
  5. Dec 11, 2018
  6. Aug 17, 2018
  7. Jul 16, 2018
  8. Jan 23, 2018
  9. Dec 21, 2017
    • Marek Vavruša's avatar
      modules/http: added /trace endpoint for request log tracing, added tests · 5e7e4c1e
      Marek Vavruša authored
      This leverages the HTTP interface to trace execution of individual
      requests. This is helpful for troubleshooting problems with a specific instance,
      or to generate test files (as it writes out answers received).
      
      Ideally it would also print a timeline of request processing broken down by
      function (or layer) and the amount of time spent, but there's no
      tracepoint for that yet.
      5e7e4c1e
  10. Nov 28, 2017
    • Marek Vavruša's avatar
      fixed issues with newer luacheck · 6c0b9868
      Marek Vavruša authored and Petr Špaček's avatar Petr Špaček committed
      Verified
      6c0b9868
    • Marek Vavruša's avatar
      tests/config: added a TAP-based test environment for modules/configs · f41676d2
      Marek Vavruša authored and Petr Špaček's avatar Petr Špaček committed
      I moved the test files to module directories because it allows
      vendoring of whole modules including tests etc.
      
      The test environment provides convenience functions and produces
      test output in TAP format. Ideally all tests should use a common
      format, so that CI can parse it provide better test output on PRs.
      It seems like Gitlab CI doesn't support anything yet, but there
      are two sort-of standards supported in CI tools - TAP and JUnit.
      I chose TAP because it's easier to read for humans, cmocka supports it,
      and it should be easier to adapt Deckard. There are also tools to
      convert TAP into JUnit XML file.
      
      Also added more tests for global functions and variables, and the
      test tool now also tracks coverage (if `luacov` is installed).
      Verified
      f41676d2
  11. Nov 24, 2017
    • Marek Vavruša's avatar
      daemon/lua: fixed unused variables, whitespace, cleanup · 3162da83
      Marek Vavruša authored
      Also fixed improper promotion of `ffi` to global variable.
      
      ```
      $ luacheck --codes daemon/lua/
      Checking daemon/lua/config.lua                    OK
      Checking daemon/lua/kres-gen.lua                  OK
      Checking daemon/lua/kres.lua                      OK
      Checking daemon/lua/sandbox.lua                   OK
      Checking daemon/lua/trust_anchors.lua             OK
      Checking daemon/lua/zonefile.lua                  OK
      
      Total: 0 warnings / 0 errors in 6 files
      ```
      3162da83
    • Marek Vavruša's avatar
      tests/config: added basic assert support (compatible with busted) · 14a0a181
      Marek Vavruša authored
      There is no dependency on a testing library yet, so I added a
      basic interface for mocking and asserting test values to get
      something to start with. I'll probably replace it with busted
      or telescope later on to get nicer testing output.
      14a0a181
  12. Nov 23, 2017
    • Marek Vavruša's avatar
      Added luacheck for linting Lua files and static analysis · 0e2ffb5d
      Marek Vavruša authored
      This is super useful for checking things like misusing undefined
      variables or modifying globals, especially in modules when it's
      not immediately visible which variables are in the global
      namespace and which are not.
      
      I added several exceptions for files in daemon/lua and tests,
      as for example sandbox module needs to legitimately modify
      global namespace.
      
      There's a lot of things failing, so I didn't make it part of the
      standard `make check`, but we should eventually enable it to
      improve code quality and spot problems with CI.
      0e2ffb5d
Loading