newContext now requires a StyleConfig, update tests.

This commit is contained in:
onyx-and-iris 2025-06-21 20:27:17 +01:00
parent 2ab1c5bfc3
commit 930b387b85
10 changed files with 26 additions and 26 deletions

View File

@ -11,7 +11,7 @@ func TestFilterList(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &FilterListCmd{
SourceName: "Mic/Aux",
@ -30,7 +30,7 @@ func TestFilterListScene(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &FilterListCmd{
SourceName: "gobs-test",
@ -49,7 +49,7 @@ func TestFilterListEmpty(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &FilterListCmd{
SourceName: "NonExistentSource",

View File

@ -11,7 +11,7 @@ func TestGroupList(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &GroupListCmd{
SceneName: "Scene",
@ -30,7 +30,7 @@ func TestGroupShow(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &GroupShowCmd{
SceneName: "Scene",
@ -50,7 +50,7 @@ func TestGroupToggle(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &GroupStatusCmd{
SceneName: "Scene",
@ -91,7 +91,7 @@ func TestGroupStatus(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdShow := &GroupShowCmd{
SceneName: "Scene",

View File

@ -11,7 +11,7 @@ func TestInputList(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &InputListCmd{}
err := cmd.Run(context)
@ -39,7 +39,7 @@ func TestInputListFilterInput(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &InputListCmd{Input: true}
err := cmd.Run(context)
@ -73,7 +73,7 @@ func TestInputListFilterOutput(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &InputListCmd{Output: true}
err := cmd.Run(context)
@ -107,7 +107,7 @@ func TestInputListFilterColour(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &InputListCmd{Colour: true}
err := cmd.Run(context)

View File

@ -12,7 +12,7 @@ func TestRecordStart(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &RecordStatusCmd{}
err := cmdStatus.Run(context)
@ -52,7 +52,7 @@ func TestRecordStop(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &RecordStatusCmd{}
err := cmdStatus.Run(context)
@ -92,7 +92,7 @@ func TestRecordToggle(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &RecordStatusCmd{}
err := cmdStatus.Run(context)

View File

@ -11,7 +11,7 @@ func TestReplayBufferStart(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &ReplayBufferStartCmd{}
err := cmd.Run(context)
@ -28,7 +28,7 @@ func TestReplayBufferStop(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &ReplayBufferStopCmd{}
err := cmd.Run(context)
@ -45,7 +45,7 @@ func TestReplayBufferToggle(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &ReplayBufferStatusCmd{}
err := cmdStatus.Run(context)

View File

@ -10,7 +10,7 @@ func TestSceneList(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &SceneListCmd{}
err := cmd.Run(context)
@ -27,7 +27,7 @@ func TestSceneCurrent(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
// Set the current scene to "gobs-test"
cmdSwitch := &SceneSwitchCmd{

View File

@ -11,7 +11,7 @@ func TestSceneItemList(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &SceneItemListCmd{
SceneName: "gobs-test",

View File

@ -12,7 +12,7 @@ func TestStreamStart(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &StreamStatusCmd{}
err := cmdStatus.Run(context)
@ -51,7 +51,7 @@ func TestStreamStop(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &StreamStatusCmd{}
err := cmdStatus.Run(context)
@ -90,7 +90,7 @@ func TestStreamToggle(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdStatus := &StreamStatusCmd{}
err := cmdStatus.Run(context)

View File

@ -10,7 +10,7 @@ func TestStudioModeEnable(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdEnable := &StudioModeEnableCmd{}
err := cmdEnable.Run(context)
@ -38,7 +38,7 @@ func TestStudioModeDisable(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmdDisable := &StudioModeDisableCmd{}
err := cmdDisable.Run(context)

View File

@ -11,7 +11,7 @@ func TestVersion(t *testing.T) {
defer disconnect()
var out bytes.Buffer
context := newContext(client, &out, "")
context := newContext(client, &out, StyleConfig{})
cmd := &ObsVersionCmd{}
err := cmd.Run(context)