// Test cases
func TestMain(m *testing.M) {
- go RunWithParams(Consumer{}, viper.GetBool("db.waitForSdl"))
+ go RunWithParams(Consumer{}, viper.GetBool("controls.waitForSdl"))
time.Sleep(time.Duration(5) * time.Second)
code := m.Run()
os.Exit(code)
// Allow time to process the messages
time.Sleep(time.Duration(5) * time.Second)
- waitForSdl := viper.GetBool("db.waitForSdl")
+ waitForSdl := viper.GetBool("controls.waitForSdl")
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 100") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
// Allow time to process the messages
time.Sleep(time.Duration(5) * time.Second)
- waitForSdl := viper.GetBool("db.waitForSdl")
+ waitForSdl := viper.GetBool("controls.waitForSdl")
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 200") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
// Allow time to process the messages
time.Sleep(time.Duration(2) * time.Second)
- waitForSdl := viper.GetBool("db.waitForSdl")
+ waitForSdl := viper.GetBool("controls.waitForSdl")
stats := getMetrics(t)
if !strings.Contains(stats, "ricxapp_RMR_Transmitted 200") {
t.Errorf("Error: ricxapp_RMR_Transmitted value incorrect: %v", stats)
func TestSubscribeChannels(t *testing.T) {
Logger.Info("CASE: TestSubscribeChannels")
- if !viper.GetBool("db.waitForSdl") {
+ if !viper.GetBool("controls.waitForSdl") {
return
}