[RICPLT-2775] Fix unit tests 79/1779/1
authorss412g <shuky.har-noy@intl.att.com>
Tue, 26 Nov 2019 15:16:40 +0000 (17:16 +0200)
committerss412g <shuky.har-noy@intl.att.com>
Tue, 26 Nov 2019 15:16:56 +0000 (17:16 +0200)
Change-Id: Ied26d5a95a4011de80175ef03b644ac6b685df45
Signed-off-by: ss412g <shuky.har-noy@intl.att.com>
RSM/configuration/configuration_test.go
RSM/resources/configuration.yaml

index b00789a..48c39dd 100644 (file)
@@ -61,7 +61,6 @@ func TestRmrConfigNotFoundFailure(t *testing.T) {
        yamlMap := map[string]interface{}{
                "logging":              map[string]interface{}{"logLevel": "info"},
                "http":                 map[string]interface{}{"port": 631},
-               "resourceStatusParams": map[string]interface{}{"enableResourceStatus": true, "periodicityCsiMs": 5},
                "rnib":                 map[string]interface{}{"maxRnibConnectionAttempts": 3, "rnibRetryIntervalMs": 10},
        }
        cleanUp := prepareTempConfigForTest(t, yamlMap)
@@ -104,7 +103,6 @@ func TestRnibConfigNotFoundFailure(t *testing.T) {
                "rmr":                  map[string]interface{}{"port": 6942, "maxMsgSize": 4096},
                "logging":              map[string]interface{}{"logLevel": "info"},
                "http":                 map[string]interface{}{"port": 631},
-               "resourceStatusParams": map[string]interface{}{"enableResourceStatus": true, "periodicityCsiMs": 5},
        }
        cleanUp := prepareTempConfigForTest(t, yamlMap)
        defer cleanUp()
@@ -113,69 +111,6 @@ func TestRnibConfigNotFoundFailure(t *testing.T) {
        assert.EqualError(t, cErr, "#configuration.fillRnibConfig - failed to fill RNib configuration: The entry 'rnib' not found\n")
 }
 
-func TestResourceStatusParamsConfigNotFoundFailure(t *testing.T) {
-
-       yamlMap := map[string]interface{}{
-               "rmr":     map[string]interface{}{"port": 6942, "maxMsgSize": 4096},
-               "logging": map[string]interface{}{"logLevel": "info"},
-               "http":    map[string]interface{}{"port": 631},
-               "rnib":    map[string]interface{}{"maxRnibConnectionAttempts": 3, "rnibRetryIntervalMs": 10},
-       }
-       cleanUp := prepareTempConfigForTest(t, yamlMap)
-       defer cleanUp()
-
-       _, cErr := ParseConfiguration()
-       assert.EqualError(t, cErr, "#configuration.fillResourceStatusParamsConfig - failed to fill resourceStatusParams configuration: The entry 'resourceStatusParams' not found\n")
-}
-
-func TestCharacteristicsConfigInvalidPeriodicityMs(t *testing.T) {
-
-       yamlMap := map[string]interface{}{
-               "rmr":                  map[string]interface{}{"port": 6942, "maxMsgSize": 4096},
-               "logging":              map[string]interface{}{"logLevel": "info"},
-               "http":                 map[string]interface{}{"port": 631},
-               "rnib":                 map[string]interface{}{"maxRnibConnectionAttempts": 3, "rnibRetryIntervalMs": 10},
-               "resourceStatusParams": map[string]interface{}{"enableResourceStatus": true, "periodicityMs": 50, "periodicityRsrpMeasurementMs": 480, "periodicityCsiMs": 20},
-       }
-       cleanUp := prepareTempConfigForTest(t, yamlMap)
-       defer cleanUp()
-
-       _, cErr := ParseConfiguration()
-       assert.Error(t, cErr)
-}
-
-func TestResourceStatusParamsConfigInvalidPeriodicityRsrpMeasurementMs(t *testing.T) {
-
-       yamlMap := map[string]interface{}{
-               "rmr":                  map[string]interface{}{"port": 6942, "maxMsgSize": 4096},
-               "logging":              map[string]interface{}{"logLevel": "info"},
-               "http":                 map[string]interface{}{"port": 631},
-               "rnib":                 map[string]interface{}{"maxRnibConnectionAttempts": 3, "rnibRetryIntervalMs": 10},
-               "resourceStatusParams": map[string]interface{}{"enableResourceStatus": true, "periodicityMs": 1000, "periodicityRsrpMeasurementMs": 50, "periodicityCsiMs": 20},
-       }
-       cleanUp := prepareTempConfigForTest(t, yamlMap)
-       defer cleanUp()
-
-       _, cErr := ParseConfiguration()
-       assert.Error(t, cErr)
-}
-
-func TestResourceStatusParamsConfigInvalidPeriodicityCsiMs(t *testing.T) {
-
-       yamlMap := map[string]interface{}{
-               "rmr":                  map[string]interface{}{"port": 6942, "maxMsgSize": 4096},
-               "logging":              map[string]interface{}{"logLevel": "info"},
-               "http":                 map[string]interface{}{"port": 631},
-               "rnib":                 map[string]interface{}{"maxRnibConnectionAttempts": 3, "rnibRetryIntervalMs": 10},
-               "resourceStatusParams": map[string]interface{}{"enableResourceStatus": true, "periodicityMs": 1000, "periodicityRsrpMeasurementMs": 480, "periodicityCsiMs": 50},
-       }
-       cleanUp := prepareTempConfigForTest(t, yamlMap)
-       defer cleanUp()
-
-       _, cErr := ParseConfiguration()
-       assert.Error(t, cErr)
-}
-
 func TestConfigurationString(t *testing.T) {
        config, err := ParseConfiguration()
        if err != nil {
@@ -187,7 +122,6 @@ func TestConfigurationString(t *testing.T) {
        assert.Contains(t, str, "http")
        assert.Contains(t, str, "rmr")
        assert.Contains(t, str, "rnib")
-       assert.Contains(t, str, "resourceStatusParams")
 }
 
 func prepareTempConfigForTest(t *testing.T, yamlMap map[string]interface{}) func() {
index 41407d6..a2bd2db 100644 (file)
@@ -8,4 +8,4 @@ rmr:
   readyIntervalSec: 1
 rnib:
   maxRnibConnectionAttempts: 3
-  rnibRetryIntervalMs: 10
+  rnibRetryIntervalMs: 10
\ No newline at end of file