X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=pkg%2Fxapp%2Fxapp_test.go;h=c4aec60664df7c7201cd1a250366e81a6ac3d3a4;hb=79f0680fd7bbf1c8a8c6e2a842cb18020e387a47;hp=8b2a9524c54a95365ce41466ec2fbffb72d01d1a;hpb=c2c130d71f20e44119f356f7ab4df92882f92c9d;p=ric-plt%2Fxapp-frame.git diff --git a/pkg/xapp/xapp_test.go b/pkg/xapp/xapp_test.go index 8b2a952..c4aec60 100755 --- a/pkg/xapp/xapp_test.go +++ b/pkg/xapp/xapp_test.go @@ -34,10 +34,10 @@ import ( "github.com/stretchr/testify/assert" ) -//var _ = func() bool { -// testing.Init() -// return true -//}() +var _ = func() bool { + testing.Init() + return true +}() type Consumer struct{} @@ -335,7 +335,7 @@ func TestAddConfigChangeListener(t *testing.T) { } func TestConfigAccess(t *testing.T) { - Logger.Info("CASE: AddConfigChangeListener") + Logger.Info("CASE: TestConfigAccess") assert.Equal(t, Config.GetString("name"), "xapp") assert.Equal(t, Config.GetInt("controls.logger.level"), 3) @@ -348,8 +348,9 @@ func TestConfigAccess(t *testing.T) { } func TestPublishConfigChange(t *testing.T) { - Logger.Info("CASE: AddConfigChangeListener") + Logger.Info("CASE: TestPublishConfigChange") PublishConfigChange("testApp", "values") + ReadConfig("testApp") } func TestNewSubscriber(t *testing.T) { @@ -391,11 +392,13 @@ func TestSdlInterfaces(t *testing.T) { Sdl.Store("myKey", "Values") Sdl.MStore("myKey", "Values") Sdl.RegisterMetrics() + Sdl.UpdateStatCounter("Stored") // Misc. var NotificationCb = func(ch string, events ...string) {} Sdl.Subscribe(NotificationCb, "channel1") Sdl.MSubscribe(NotificationCb, "channel1", "channel2") + Sdl.StoreAndPublish("channel1", "event", "key1", "data1") Sdl.MStoreAndPublish([]string{"channel1"}, "event", "key1", "data1") }