diff options
author | 2019-08-23 07:49:25 -0700 | |
---|---|---|
committer | 2019-08-24 10:34:13 +0200 | |
commit | b65f1215e7dfab5630c0e2c1da8afec4cd08173f (patch) | |
tree | 152ae8bec276df8f9d41c4ccb48570997679cdd3 /ui-react/src/__test__/LoopCache.test.js | |
parent | 3142c70fb7530c444c891674fe55c6a9b236dfb3 (diff) |
Update react
Update react compo to latest ones
Issue-ID: CLAMP-477
Change-Id: I108b31c7e25595d96bc598f394590f23436335a1
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'ui-react/src/__test__/LoopCache.test.js')
-rw-r--r-- | ui-react/src/__test__/LoopCache.test.js | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/ui-react/src/__test__/LoopCache.test.js b/ui-react/src/__test__/LoopCache.test.js index 101f864aa..1efea6495 100644 --- a/ui-react/src/__test__/LoopCache.test.js +++ b/ui-react/src/__test__/LoopCache.test.js @@ -85,24 +85,19 @@ describe('Verify LoopCache functions', () => { "shared": false, "jsonRepresentation": {"schema": {}} }; - expect(loopCache.getMicroServicesJsonForType("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msJson); - expect(loopCache.getMicroServicesJsonForType("TCA_h2NMX_v1_0_ResourceInstanceName1_tca_2")).toBeNull(); + expect(loopCache.getMicroServiceForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msJson); + expect(loopCache.getMicroServiceForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca_2")).toBeNull(); }); it('getMicroServicePropertiesForName', () => { const msProp = {"domain": "measurementsForVfScaling"}; - expect(loopCache.getMicroServiceProperties("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msProp); - expect(loopCache.getMicroServiceProperties("TCA_h2NMX_v1_0_ResourceInstanceName1_tca_2")).toBeNull(); - }); - - it('getMicroServiceJsonRepresentationForType', () => { - const msJsonRepresentation = {"schema": {}}; - expect(loopCache.getMicroServiceJsonRepresentationForType("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msJsonRepresentation); + expect(loopCache.getMicroServicePropertiesForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msProp); + expect(loopCache.getMicroServicePropertiesForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca_2")).toBeNull(); }); it('getMicroServiceJsonRepresentationForName', () => { const msJsonRepresentation = {"schema": {}}; - expect(loopCache.getMicroServiceJsonRepresentationForType("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msJsonRepresentation); + expect(loopCache.getMicroServiceJsonRepresentationForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(msJsonRepresentation); }); it('getResourceDetailsVfProperty', () => { @@ -204,14 +199,8 @@ describe('Verify LoopCache functions', () => { }); it('updateMicroServiceProperties', () => { - const newMsPolicy = { - "name": "TCA_h2NMX_v1_0_ResourceInstanceName1_tca", - "modelType": "onap.policies.monitoring.cdap.tca.hi.lo.app", - "properties": {"domain": "measurementsForVfScalingNew"}, - "shared": true, - "jsonRepresentation": {"schema": {}} - };; - loopCache.updateMicroServiceProperties("TCA_h2NMX_v1_0_ResourceInstanceName1_tca", newMsPolicy); - expect(loopCache.getMicroServicesJsonForType("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(newMsPolicy); + const newMsPolicyProperties = {"domain": "measurementsForVfScalingNew"}; + loopCache.updateMicroServiceProperties("TCA_h2NMX_v1_0_ResourceInstanceName1_tca", newMsPolicyProperties); + expect(loopCache.getMicroServicePropertiesForName("TCA_h2NMX_v1_0_ResourceInstanceName1_tca")).toStrictEqual(newMsPolicyProperties); }); }); |