mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2024-12-22 13:52:19 +00:00
Test loading the configuration
This commit is contained in:
parent
4024ed5b2a
commit
b647c761f3
27
main_test.go
27
main_test.go
@ -1 +1,28 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/spf13/viper"
|
||||
"gitlab.crans.org/nounous/ghostream/auth"
|
||||
"gitlab.crans.org/nounous/ghostream/internal/monitoring"
|
||||
"gitlab.crans.org/nounous/ghostream/stream/multicast"
|
||||
"gitlab.crans.org/nounous/ghostream/stream/srt"
|
||||
"gitlab.crans.org/nounous/ghostream/stream/webrtc"
|
||||
"gitlab.crans.org/nounous/ghostream/web"
|
||||
"testing"
|
||||
)
|
||||
|
||||
// TestLoadConfiguration tests the configuration file loading and the init of some parameters
|
||||
func TestLoadConfiguration(t *testing.T) {
|
||||
loadConfiguration()
|
||||
cfg := struct {
|
||||
Auth auth.Options
|
||||
Monitoring monitoring.Options
|
||||
Multicast multicast.Options
|
||||
Srt srt.Options
|
||||
Web web.Options
|
||||
WebRTC webrtc.Options
|
||||
}{}
|
||||
if err := viper.Unmarshal(&cfg); err != nil {
|
||||
t.Fatal("Failed to load settings", err)
|
||||
}
|
||||
}
|
||||
|
1
stream/multicast/multicast_test.go
Normal file
1
stream/multicast/multicast_test.go
Normal file
@ -0,0 +1 @@
|
||||
package multicast
|
Loading…
Reference in New Issue
Block a user