From 4fd190bc4ea0586b98af9b2416991025c7df3a57 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Sat, 14 Jun 2025 09:13:25 +0100 Subject: [PATCH] read host, streamname from env --- vbantxt_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/vbantxt_test.go b/vbantxt_test.go index 0868945..49c5ba0 100644 --- a/vbantxt_test.go +++ b/vbantxt_test.go @@ -4,6 +4,7 @@ import ( "bufio" "bytes" _ "embed" + "os" "testing" "github.com/onyx-and-iris/vbantxt" @@ -28,14 +29,14 @@ func run(t *testing.T, client *vbantxt.VbanTxt, script []byte) { } func TestSendVm(t *testing.T) { - client, err := vbantxt.New("localhost", 6980, "onyx") + client, err := vbantxt.New(os.Getenv("VBANTXT_HOST"), 6980, os.Getenv("VBANTXT_STREAMNAME")) require.NoError(t, err) run(t, client, vm) } func TestSendMatrix(t *testing.T) { - client, err := vbantxt.New("localhost", 6990, "onyx") + client, err := vbantxt.New(os.Getenv("VBANTXT_HOST"), 6990, os.Getenv("VBANTXT_STREAMNAME")) require.NoError(t, err) run(t, client, matrix)