Skip to content

Commit

Permalink
Change @Test-port env name not to conflict with BROKER_WEB_SOCKET_PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
Simeon Miteff committed Aug 21, 2023
1 parent d01f7cd commit 4f462a4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions tests/btests/receive_event.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @TEST-PORT: BROKER_WEB_SOCKET_PORT
# @TEST-PORT: BTEST_BROKER_WEB_SOCKET_PORT
# @TEST-EXEC: btest-bg-run sender "zeek ../test.zeek > send.out"
# @TEST-EXEC: go run test.go > receive.out
# @TEST-EXEC: btest-bg-wait -k 10
Expand All @@ -18,7 +18,7 @@ export {

event zeek_init()
{
Broker::listen_websocket("127.0.0.1", to_port(getenv("BROKER_WEB_SOCKET_PORT")));
Broker::listen_websocket("127.0.0.1", to_port(getenv("BTEST_BROKER_WEB_SOCKET_PORT")));
}

event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
Expand Down Expand Up @@ -72,9 +72,9 @@ import (
func main() {
topic := "/topic/test"

portString := os.Getenv("BROKER_WEB_SOCKET_PORT")
portString := os.Getenv("BTEST_BROKER_WEB_SOCKET_PORT")
if portString == "" {
panic("BROKER_WEB_SOCKET_PORT not set")
panic("BTEST_BROKER_WEB_SOCKET_PORT not set")
}

portString = strings.TrimSuffix(portString, "/tcp")
Expand Down
8 changes: 4 additions & 4 deletions tests/btests/receive_event_certs.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @TEST-PORT: BROKER_WEB_SOCKET_PORT
# @TEST-PORT: BTEST_BROKER_WEB_SOCKET_PORT
# @TEST-EXEC: btest-bg-run sender "SSL_CAFILE=${FILES}/minica.pem SSL_CERTIFICATE=${FILES}/cert.pem SSL_KEYFILE=${FILES}/key.pem zeek ../test.zeek > send.out"
# @TEST-EXEC: SSL_CAFILE=${FILES}/minica.pem SSL_CERTIFICATE=${FILES}/cert.pem SSL_KEYFILE=${FILES}/key.pem go run test.go > receive.out
# @TEST-EXEC: btest-bg-wait -k 10
Expand All @@ -22,7 +22,7 @@ export {

event zeek_init()
{
Broker::listen_websocket("127.0.0.1", to_port(getenv("BROKER_WEB_SOCKET_PORT")));
Broker::listen_websocket("127.0.0.1", to_port(getenv("BTEST_BROKER_WEB_SOCKET_PORT")));
}

event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
Expand Down Expand Up @@ -76,9 +76,9 @@ import (
func main() {
topic := "/topic/test"

portString := os.Getenv("BROKER_WEB_SOCKET_PORT")
portString := os.Getenv("BTEST_BROKER_WEB_SOCKET_PORT")
if portString == "" {
panic("BROKER_WEB_SOCKET_PORT not set")
panic("BTEST_BROKER_WEB_SOCKET_PORT not set")
}

portString = strings.TrimSuffix(portString, "/tcp")
Expand Down
8 changes: 4 additions & 4 deletions tests/btests/receive_event_nossl.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @TEST-PORT: BROKER_WEB_SOCKET_PORT
# @TEST-PORT: BTEST_BROKER_WEB_SOCKET_PORT
# @TEST-EXEC: btest-bg-run sender "zeek ../test.zeek > send.out"
# @TEST-EXEC: go run test.go > receive.out
# @TEST-EXEC: btest-bg-wait -k 10
Expand All @@ -19,7 +19,7 @@ export {

event zeek_init()
{
Broker::listen_websocket("127.0.0.1", to_port(getenv("BROKER_WEB_SOCKET_PORT")));
Broker::listen_websocket("127.0.0.1", to_port(getenv("BTEST_BROKER_WEB_SOCKET_PORT")));
}

event Broker::peer_added(endpoint: Broker::EndpointInfo, msg: string)
Expand Down Expand Up @@ -72,9 +72,9 @@ import (
func main() {
topic := "/topic/test"

portString := os.Getenv("BROKER_WEB_SOCKET_PORT")
portString := os.Getenv("BTEST_BROKER_WEB_SOCKET_PORT")
if portString == "" {
panic("BROKER_WEB_SOCKET_PORT not set")
panic("BTEST_BROKER_WEB_SOCKET_PORT not set")
}

portString = strings.TrimSuffix(portString, "/tcp")
Expand Down
8 changes: 4 additions & 4 deletions tests/btests/send_event.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @TEST-PORT: BROKER_WEB_SOCKET_PORT
# @TEST-PORT: BTEST_BROKER_WEB_SOCKET_PORT
# @TEST-EXEC: btest-bg-run receiver "zeek ../test.zeek > receive.out"
# @TEST-EXEC: go run test.go > send.out
# @TEST-EXEC: btest-bg-wait -k 10
Expand Down Expand Up @@ -37,7 +37,7 @@ event test(a1: bool, a2: int, a3: count, a4: double, a5: time, a6: interval, a7:

event zeek_init()
{
Broker::listen_websocket("127.0.0.1", to_port(getenv("BROKER_WEB_SOCKET_PORT")));
Broker::listen_websocket("127.0.0.1", to_port(getenv("BTEST_BROKER_WEB_SOCKET_PORT")));
Broker::subscribe(test_topic);
}

Expand Down Expand Up @@ -67,9 +67,9 @@ import (
func main() {
topic := "/topic/test"

portString := os.Getenv("BROKER_WEB_SOCKET_PORT")
portString := os.Getenv("BTEST_BROKER_WEB_SOCKET_PORT")
if portString == "" {
panic("BROKER_WEB_SOCKET_PORT not set")
panic("BTEST_BROKER_WEB_SOCKET_PORT not set")
}

portString = strings.TrimSuffix(portString, "/tcp")
Expand Down

0 comments on commit 4f462a4

Please sign in to comment.