mirror of
https://github.com/mumble-voip/grumble.git
synced 2025-12-19 21:59:59 -08:00
MaxUsers: modifies existing sessionpool similar to Murmur MaxUsersPerChannel: already implemented, inconsistent name AllowPing: affects registration, too DefaultChannel RememberChannel ServerPassword SendOSInfo: already implemented, inconsistent name Config keys are renamed to conform to murmur.ini
40 lines
796 B
Go
40 lines
796 B
Go
// Copyright (c) 2011 The Grumble Authors
|
|
// The use of this source code is goverened by a BSD-style
|
|
// license that can be found in the LICENSE-file.
|
|
|
|
package serverconf
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestIntValue(t *testing.T) {
|
|
cfg := New(nil, nil)
|
|
cfg.Set("Test", "13")
|
|
if cfg.IntValue("Test") != 13 {
|
|
t.Errorf("Expected 13")
|
|
}
|
|
}
|
|
|
|
func TestFloatAsInt(t *testing.T) {
|
|
cfg := New(nil, nil)
|
|
cfg.Set("Test", "13.4")
|
|
if cfg.IntValue("Test") != 0 {
|
|
t.Errorf("Expected 0")
|
|
}
|
|
}
|
|
|
|
func TestDefaultValue(t *testing.T) {
|
|
cfg := New(nil, nil)
|
|
if cfg.IntValue("bandwidth") != 72000 {
|
|
t.Errorf("Expected 72000")
|
|
}
|
|
}
|
|
|
|
func TestBoolValue(t *testing.T) {
|
|
cfg := New(nil, nil)
|
|
cfg.Set("DoStuffOnStartup", "true")
|
|
if cfg.BoolValue("DoStuffOnStartup") != true {
|
|
t.Errorf("Expected true")
|
|
}
|
|
}
|