From 4f462a4d63fa3a0447a91788734a54541dc5b466 Mon Sep 17 00:00:00 2001 From: Simeon Miteff Date: Mon, 21 Aug 2023 14:00:13 +1000 Subject: [PATCH] Change @TEST-PORT env name not to conflict with BROKER_WEB_SOCKET_PORT --- tests/btests/receive_event.test | 8 ++++---- tests/btests/receive_event_certs.test | 8 ++++---- tests/btests/receive_event_nossl.test | 8 ++++---- tests/btests/send_event.test | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/btests/receive_event.test b/tests/btests/receive_event.test index 2c60e7e..9b1cbe2 100644 --- a/tests/btests/receive_event.test +++ b/tests/btests/receive_event.test @@ -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 @@ -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) @@ -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") diff --git a/tests/btests/receive_event_certs.test b/tests/btests/receive_event_certs.test index ec326a4..dccb516 100644 --- a/tests/btests/receive_event_certs.test +++ b/tests/btests/receive_event_certs.test @@ -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 @@ -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) @@ -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") diff --git a/tests/btests/receive_event_nossl.test b/tests/btests/receive_event_nossl.test index e40b1d4..fa58550 100644 --- a/tests/btests/receive_event_nossl.test +++ b/tests/btests/receive_event_nossl.test @@ -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 @@ -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) @@ -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") diff --git a/tests/btests/send_event.test b/tests/btests/send_event.test index ef39603..3f797d8 100644 --- a/tests/btests/send_event.test +++ b/tests/btests/send_event.test @@ -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 @@ -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); } @@ -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")