-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(test) revert to regular busted, no more rbusted (#121)
- Loading branch information
Showing
3 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
return { | ||
default = { | ||
lua = "spec/resty-runner.lua", | ||
verbose = true, | ||
coverage = false, | ||
output = "gtest", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,4 @@ install: | |
|
||
script: | ||
- luacheck ./src | ||
- ./rbusted --lpath=`pwd`/src/?.lua ./spec/ | ||
- busted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env resty | ||
|
||
-- script to run Busted tests using Openresty while setting some extra flags. | ||
-- | ||
-- This script should be specified as: | ||
-- busted --lua=<this-file> | ||
-- | ||
-- Alternatively specify it in the `.busted` config file | ||
|
||
|
||
-- These flags are passed to `resty` by default, to allow for more connections | ||
-- and disable the Global variable write-guard. Override it by setting the | ||
-- environment variable `BUSTED_RESTY_FLAGS`. | ||
local RESTY_FLAGS=os.getenv("BUSTED_RESTY_FLAGS") or "-c 4096 -e 'setmetatable(_G, nil)'" | ||
|
||
-- rebuild the invoked commandline, while inserting extra resty-flags | ||
local cmd = { | ||
"exec", | ||
arg[-1], | ||
RESTY_FLAGS, | ||
} | ||
for i, param in ipairs(arg) do | ||
table.insert(cmd, "'" .. param .. "'") | ||
end | ||
|
||
local _, _, rc = os.execute(table.concat(cmd, " ")) | ||
os.exit(rc) |