read host, streamname from env

This commit is contained in:
onyx-and-iris 2025-06-14 09:13:25 +01:00
parent c0aad67199
commit 4fd190bc4e

View File

@ -4,6 +4,7 @@ import (
"bufio" "bufio"
"bytes" "bytes"
_ "embed" _ "embed"
"os"
"testing" "testing"
"github.com/onyx-and-iris/vbantxt" "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) { 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) require.NoError(t, err)
run(t, client, vm) run(t, client, vm)
} }
func TestSendMatrix(t *testing.T) { 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) require.NoError(t, err)
run(t, client, matrix) run(t, client, matrix)