mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Return a warning and fail if creating a store at global scope
This commit is contained in:
parent
33eaa5ccda
commit
6b5d0491aa
3 changed files with 16 additions and 0 deletions
|
@ -0,0 +1,3 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
error in <...>/create-global-failure.zeek, line 5: Broker stores cannot be created at the global scope
|
||||
error in <...>/create-global-failure.zeek, line 5: Could not create Broker master store 'store'
|
6
testing/btest/broker/store/create-global-failure.zeek
Normal file
6
testing/btest/broker/store/create-global-failure.zeek
Normal file
|
@ -0,0 +1,6 @@
|
|||
# @TEST-DOC: Tests that creating a broker store at global scope returns an error
|
||||
# @TEST-EXEC-FAIL: zeek -b %INPUT >out 2>&1
|
||||
# @TEST-EXEC: TEST_DIFF_CANONIFIER=$SCRIPTS/diff-remove-abspath btest-diff out
|
||||
|
||||
const x = Broker::create_master("store");
|
||||
global t: table[string] of count &broker_store="store";
|
Loading…
Add table
Add a link
Reference in a new issue