Skip to content

Commit

Permalink
tests(helpers): support ldoc generation (#13636)
Browse files Browse the repository at this point in the history
KAG-5333, support ldoc generation.
- edit `config.ld`, add directory `./details` and `merge=true`
- add `@module` header for separated test modules
  • Loading branch information
chronolaw authored Sep 11, 2024
1 parent 4f63f13 commit 057a0b8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spec/config.ld
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ project='Kong test helpers'
title='Kong test framework'
description='Test helper functions for Kong (integration) testing'
format='markdown'
file={'./helpers.lua','./helpers'}
file={'./helpers.lua','./helpers','./details'}
dir='docs'
readme='README.md'
sort=true
sort_modules=true
style='./'
no_space_before_args=true
merge=true
8 changes: 8 additions & 0 deletions spec/details/dns.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
------------------------------------------------------------------
-- Collection of utilities to help testing Kong features and plugins.
--
-- @copyright Copyright 2016-2022 Kong Inc. All rights reserved.
-- @license [Apache 2.0](https://opensource.org/licenses/Apache-2.0)
-- @module spec.helpers


local cjson = require("cjson.safe")


Expand Down
8 changes: 8 additions & 0 deletions spec/details/misc.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
------------------------------------------------------------------
-- Collection of utilities to help testing Kong features and plugins.
--
-- @copyright Copyright 2016-2022 Kong Inc. All rights reserved.
-- @license [Apache 2.0](https://opensource.org/licenses/Apache-2.0)
-- @module spec.helpers


-- miscellaneous


Expand Down
8 changes: 8 additions & 0 deletions spec/details/shell.lua
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
------------------------------------------------------------------
-- Collection of utilities to help testing Kong features and plugins.
--
-- @copyright Copyright 2016-2022 Kong Inc. All rights reserved.
-- @license [Apache 2.0](https://opensource.org/licenses/Apache-2.0)
-- @module spec.helpers


local shell = require("resty.shell")
local conf_loader = require("kong.conf_loader")
local strip = require("kong.tools.string").strip
Expand Down

1 comment on commit 057a0b8

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:057a0b8a6616f1d078eed97519be12b32a76299b
Artifacts available https://github.com/Kong/kong/actions/runs/10807315456

Please sign in to comment.