ngx table in checks when writing unit tests not available #20
Labels
No labels
Critical Bug
Documentation
Feature
Small bug
tests
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
babka/activitycolander#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When writing a unit test using busted for the
banmecheck I found that I could not write to the global variables available tobanme.luaand thus cannot create a stubngxtable.This is a problem, because without the
ngxtable the check will cause an error when run in Lua without OpenResty.Solutions:
ngxto the checks (dependency injection)ngxtable in checksassigned to @CSDUMMI
mentioned in merge request !17
I used dependency injection now and was able to implement and run unit tests for banme.
We still need to run a redis server to be able to test redistest or any other check relying on redis.
This is resolved now I believe. Feel free to re-open if not.