Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
awall
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
awall
Commits
b8bb8e88
Commit
b8bb8e88
authored
Oct 07, 2017
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: filter-limit: name
parent
ec0c0201
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5932 additions
and
3502 deletions
+5932
-3502
test/mandatory/filter-limit.lua
test/mandatory/filter-limit.lua
+21
-15
test/output/dump
test/output/dump
+4513
-2893
test/output/rules-save
test/output/rules-save
+699
-297
test/output/rules6-save
test/output/rules6-save
+699
-297
No files found.
test/mandatory/filter-limit.lua
View file @
b8bb8e88
u
til
=
require
(
'awall.util'
)
u
pdate
=
require
(
'awall.util'
).
update
json
=
require
(
'cjson'
)
res
=
{}
...
...
@@ -11,20 +11,26 @@ function add(limit_type, base)
{
count
=
count
,
log
=
false
},
{
count
=
count
,
log
=
'none'
}
}
do
for
_
,
log
in
ipairs
{
false
,
true
,
'none'
}
do
for
_
,
action
in
ipairs
{
false
,
'pass'
}
do
if
not
(
count
==
30
and
log
and
action
)
then
table.insert
(
res
,
util
.
update
(
util
.
copy
(
base
or
{}),
{
[
limit_type
..
'-limit'
]
=
limit
,
log
=
log
or
nil
,
action
=
action
or
nil
}
)
)
for
_
,
name
in
ipairs
{
false
,
type
(
limit
)
==
'table'
and
count
==
1
and
'foo'
or
nil
}
do
for
_
,
log
in
ipairs
{
false
,
true
,
'none'
}
do
for
_
,
action
in
ipairs
{
false
,
'pass'
}
do
if
not
(
count
==
30
and
log
and
action
)
then
table.insert
(
res
,
update
(
{
[
limit_type
..
'-limit'
]
=
type
(
limit
)
==
'table'
and
update
(
{
name
=
name
or
nil
},
limit
)
or
limit
,
log
=
log
or
nil
,
action
=
action
or
nil
},
base
or
{}
)
)
end
end
end
end
...
...
test/output/dump
View file @
b8bb8e88
This diff is collapsed.
Click to expand it.
test/output/rules-save
View file @
b8bb8e88
This diff is collapsed.
Click to expand it.
test/output/rules6-save
View file @
b8bb8e88
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment