Skip to content

Commit

Permalink
#17 set password properly for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cfindlayisme committed May 28, 2024
1 parent 538a8b7 commit 77c90b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion requesthandlers/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

func TestEndpointsPasswordProtection(t *testing.T) {
os.Setenv("WMB_PASSWORD", "correct_password")
os.Setenv("PASSWORD", "correct_password")
gin.SetMode(gin.TestMode)

// Mock the SendMessage function
Expand Down Expand Up @@ -81,6 +81,7 @@ func TestEndpointsPasswordProtection(t *testing.T) {

func TestSendBroadcastMessage(t *testing.T) {
// Set up environment variables
os.Setenv("PASSWORD", "correct_password")
os.Setenv("IRC_CHANNEL", "channel1")
os.Setenv("OTHER_IRC_CHANNELS", "channel2,channel3")

Expand Down

0 comments on commit 77c90b4

Please sign in to comment.