2 Commits

Author SHA1 Message Date
eeb789003b add changelog links 2025-06-14 09:16:19 +01:00
4fd190bc4e read host, streamname from env 2025-06-14 09:13:25 +01:00
2 changed files with 5 additions and 4 deletions

View File

@@ -15,14 +15,14 @@ Before any major/minor/patch bump all unit tests will be run to verify they pass
### Added ### Added
- it's now possible to load configuration from environment variables. See [Environment Variables]() - it's now possible to load configuration from environment variables. See [Environment Variables](https://github.com/onyx-and-iris/vbantxt/tree/main?tab=readme-ov-file#environment-variables)
- --version/-v command - --version/-v command
### Changed ### Changed
- shortname for --host flag is now -H. - shortname for --host flag is now -H.
- shortname for --channel flag is now -n. - shortname for --channel flag is now -n.
- toml loader no longer requires a `[connection]` table. See [TOML Config]() - toml loader no longer requires a `[connection]` table. See [TOML Config](https://github.com/onyx-and-iris/vbantxt/tree/main?tab=readme-ov-file#toml-config)
# [0.4.1] - 2025-04-05 # [0.4.1] - 2025-04-05

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)