Support for UMF Componenets Model - Transceivers#226
Draft
divyagayathri-hcl wants to merge 2 commits into
Draft
Conversation
…ated-circuit Signed-off-by: Niranjani Vivek <niranjaniv@google.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
6b92f5d to
5a44338
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
5a44338 to
d4198d6
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d4198d6 to
f10aa74
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
f10aa74 to
854639b
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Author
|
@github-copilot Could you review this PR? |
Signed-off-by: divyagayathri-hcl <divyagayathri.s@hcl.com>
854639b to
ed3c0f3
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary: Support for UMF Componenets Model - Transceivers.
UT Results:
./testapp.test -test.v -test.run TestCompRoot_* -test.coverprofile=coverage.out
...
=== RUN TestCompRoot_ComponentTypeString
--- PASS: TestCompRoot_ComponentTypeString (0.00s)
=== RUN TestCompRoot_ValidICName
=== RUN TestCompRoot_ValidICName/Fails_HasPrefix_check
=== RUN TestCompRoot_ValidICName/Fails_len(sp)<2_check(Prefix_matches_exactly,but_nothing_follows)
=== RUN TestCompRoot_ValidICName/Fails_Atoi_check(Suffix_is_not_a_valid_integer)
=== RUN TestCompRoot_ValidICName/Fails_Atoi_check(Suffix_is_not_a_valid_integer)#1
=== RUN TestCompRoot_ValidICName/Passes_all_checks_(Valid_IC_name)
--- PASS: TestCompRoot_ValidICName (0.00s)
--- PASS: TestCompRoot_ValidICName/Fails_HasPrefix_check (0.00s)
--- PASS: TestCompRoot_ValidICName/Fails_len(sp)<2_check(Prefix_matches_exactly,but_nothing_follows) (0.00s)
--- PASS: TestCompRoot_ValidICName/Fails_Atoi_check(Suffix_is_not_a_valid_integer) (0.00s)
--- PASS: TestCompRoot_ValidICName/Fails_Atoi_check(Suffix_is_not_a_valid_integer)#1 (0.00s)
--- PASS: TestCompRoot_ValidICName/Passes_all_checks_(Valid_IC_name) (0.00s)
=== RUN TestCompRoot_GetCompTypeByName
--- PASS: TestCompRoot_GetCompTypeByName (0.00s)
=== RUN TestCompRoot_GetCompType_ErrorCases
--- PASS: TestCompRoot_GetCompType_ErrorCases (0.00s)
=== RUN TestCompRoot_CompTypesForSubscriptionUri_Transceiver
--- PASS: TestCompRoot_CompTypesForSubscriptionUri_Transceiver (0.00s)
=== RUN TestCompRoot_GetPfmRootObject
--- PASS: TestCompRoot_GetPfmRootObject (0.00s)
=== RUN TestCompRoot_GetPfmRootObject_Success
--- PASS: TestCompRoot_GetPfmRootObject_Success (0.00s)
=== RUN TestCompRoot_GetSysComponentsWithUnknownComponentType
--- PASS: TestCompRoot_GetSysComponentsWithUnknownComponentType (0.00s)
=== RUN TestCompRoot_Subscribe_pfm_components_xfmr
=== RUN TestCompRoot_Subscribe_pfm_components_xfmr/Early_Exit_-Key_is_empty(Requesting_ALL_components)
=== RUN TestCompRoot_Subscribe_pfm_components_xfmr/Early_Exit_-Key_contains__sensor
=== RUN TestCompRoot_Subscribe_pfm_components_xfmr/Error_Path-Invalid_requestURI_syntax_triggers_error_return
=== RUN TestCompRoot_Subscribe_pfm_components_xfmr/Fallback_Path-Unhandled_subscProc_falls_through_to_final_return
--- PASS: TestCompRoot_Subscribe_pfm_components_xfmr (0.00s)
--- PASS: TestCompRoot_Subscribe_pfm_components_xfmr/Early_Exit-Key_is_empty(Requesting_ALL_components) (0.00s)
--- PASS: TestCompRoot_Subscribe_pfm_components_xfmr/Early_Exit_-Key_contains__sensor (0.00s)
--- PASS: TestCompRoot_Subscribe_pfm_components_xfmr/Error_Path-Invalid_requestURI_syntax_triggers_error_return (0.00s)
--- PASS: TestCompRoot_Subscribe_pfm_components_xfmr/Fallback_Path-_Unhandled_subscProc_falls_through_to_final_return (0.00s)
=== RUN TestCompRoot_GetSysComponents_AllPaths
=== RUN TestCompRoot_GetSysComponents_AllPaths/Empty_Component_Name_Loop
=== RUN TestCompRoot_GetSysComponents_AllPaths/Valid_Component_Else_Block
=== RUN TestCompRoot_GetSysComponents_AllPaths/COMP_ST_State_Paths_Block
=== RUN TestCompRoot_GetSysComponents_AllPaths/COMP_CFG_Config_Paths_Block
--- PASS: TestCompRoot_GetSysComponents_AllPaths (0.00s)
--- PASS: TestCompRoot_GetSysComponents_AllPaths/Empty_Component_Name_Loop (0.00s)
--- PASS: TestCompRoot_GetSysComponents_AllPaths/Valid_Component_Else_Block (0.00s)
--- PASS: TestCompRoot_GetSysComponents_AllPaths/COMP_ST_State_Paths_Block (0.00s)
--- PASS: TestCompRoot_GetSysComponents_AllPaths/COMP_CFG_Config_Paths_Block (0.00s)
=== RUN TestCompRoot_GetSysComponents_TypeSpecificRouting
=== RUN TestCompRoot_GetSysComponents_TypeSpecificRouting/Xcvr_Base_Prefix_Sub-path
xfmr_platform_test.go:441: Routing executed safely through base prefix channels: Translib Redis Error: Entry does not exist: TRANSCEIVER_STATUS|Ethernet0
=== RUN TestCompRoot_GetSysComponents_TypeSpecificRouting/Xcvr_Fallback_Default_Sub-path
xfmr_platform_test.go:463: Routing executed safely through individual fallback channels: Translib Redis Error: Entry does not exist: TRANSCEIVER_STATUS|Ethernet0
=== RUN TestCompRoot_GetSysComponents_TypeSpecificRouting/Integrated_Circuit_Component_Path
xfmr_platform_test.go:487: Routing executed safely through fillICInfo: Translib Redis Error: Entry does not exist: TRANSCEIVER_STATUS|Ethernet0
--- PASS: TestCompRoot_GetSysComponents_TypeSpecificRouting (0.00s)
--- PASS: TestCompRoot_GetSysComponents_TypeSpecificRouting/Xcvr_Base_Prefix_Sub-path (0.00s)
--- PASS: TestCompRoot_GetSysComponents_TypeSpecificRouting/Xcvr_Fallback_Default_Sub-path (0.00s)
--- PASS: TestCompRoot_GetSysComponents_TypeSpecificRouting/Integrated_Circuit_Component_Path (0.00s)
=== RUN TestCompRoot_TranslateExists_TableNotFound
--- PASS: TestCompRoot_TranslateExists_TableNotFound (0.00s)
=== RUN TestCompRoot_GetAllTableEntries
=== RUN TestCompRoot_GetAllTableEntries/Coverage:_Empty_table_name_exits_early
=== RUN TestCompRoot_GetAllTableEntries/Coverage:_Empty_key_exits_early
=== RUN TestCompRoot_GetAllTableEntries/Coverage:_DB_execution_failure_bubbles_up
=== RUN TestCompRoot_GetAllTableEntries/Check_valid_case
--- PASS: TestCompRoot_GetAllTableEntries (0.00s)
--- PASS: TestCompRoot_GetAllTableEntries/Coverage:_Empty_table_name_exits_early (0.00s)
--- PASS: TestCompRoot_GetAllTableEntries/Coverage:_Empty_key_exits_early (0.00s)
--- PASS: TestCompRoot_GetAllTableEntries/Coverage:_DB_execution_failure_bubbles_up (0.00s)
--- PASS: TestCompRoot_GetAllTableEntries/Check_valid_case (0.00s)
=== RUN TestCompRoot_GetAllTableEntries_Loop
xfmr_platform_test.go:614: Loop executed successfully. Extracted string array length: 0, items: []
--- PASS: TestCompRoot_GetAllTableEntries_Loop (0.00s)
=== RUN TestCompRoot_FillICInfo
=== RUN TestCompRoot_FillICInfo/Coverage:_Path_matches_COMP_exactly
=== RUN TestCompRoot_FillICInfo/Coverage:_Path_matches_COMP_ST_exactly
=== RUN TestCompRoot_FillICInfo/Coverage:_Path_has_COMP_ST_prefix_but_hits_switch_default
=== RUN TestCompRoot_FillICInfo/Coverage:_Path_doesn't_match_either_condition
--- PASS: TestCompRoot_FillICInfo (0.00s)
--- PASS: TestCompRoot_FillICInfo/Coverage:_Path_matches_COMP_exactly (0.00s)
--- PASS: TestCompRoot_FillICInfo/Coverage:_Path_matches_COMP_ST_exactly (0.00s)
--- PASS: TestCompRoot_FillICInfo/Coverage:_Path_has_COMP_ST_prefix_but_hits_switch_default (0.00s)
--- PASS: TestCompRoot_FillICInfo/Coverage:_Path_doesn't_match_either_condition (0.00s)
=== RUN TestCompRoot_DbToYang_pfm_components_xfmr
=== RUN TestCompRoot_DbToYang_pfm_components_xfmr/Coverage:_Unsupported_request_URI_triggers_early_exit_error
=== RUN TestCompRoot_DbToYang_pfm_components_xfmr/Coverage:_Successful_execution_path_calls_downstream_getSysComponents
--- PASS: TestCompRoot_DbToYang_pfm_components_xfmr (0.00s)
--- PASS: TestCompRoot_DbToYang_pfm_components_xfmr/Coverage:_Unsupported_request_URI_triggers_early_exit_error (0.00s)
--- PASS: TestCompRoot_DbToYang_pfm_components_xfmr/Coverage:Successful_execution_path_calls_downstream_getSysComponents (0.00s)
=== RUN TestCompRoot_CompTypeToFuncCall
=== RUN TestCompRoot_CompTypeToFuncCall/Invalid_Component_Type_returns_error
=== RUN TestCompRoot_CompTypeToFuncCall/Valid_CompTypeIC_path
--- PASS: TestCompRoot_CompTypeToFuncCall (0.00s)
--- PASS: TestCompRoot_CompTypeToFuncCall/Invalid_Component_Type_returns_error (0.00s)
--- PASS: TestCompRoot_CompTypeToFuncCall/Valid_CompTypeIC_path (0.00s)
=== RUN TestCompRoot_CreateCompAndFuncCall_Success
=== RUN TestCompRoot_CreateCompAndFuncCall_Success/Successful_component_creation_and_execution_for_default_type
--- PASS: TestCompRoot_CreateCompAndFuncCall_Success (0.00s)
--- PASS: TestCompRoot_CreateCompAndFuncCall_Success/Successful_component_creation_and_execution_for_default_type (0.00s)
=== RUN TestCompRoot_Subscribe_pfm_components_xfmr_TranslateExists
--- PASS: TestCompRoot_Subscribe_pfm_components_xfmr_TranslateExists (0.00s)
=== RUN TestCompRoot_Subscribe_pfm_components_xfmr_TranslateSubscribe
--- PASS: TestCompRoot_Subscribe_pfm_components_xfmr_TranslateSubscribe (0.00s)
=== RUN TestCompRoot_TranslateExistsInvalidKey
--- PASS: TestCompRoot_TranslateExistsInvalidKey (0.00s)
=== RUN TestCompRoot_TranslateExistsValidKey
--- PASS: TestCompRoot_TranslateExistsValidKey (0.00s)
=== RUN TestCompRoot_TranslateSubscribeValidKey
--- PASS: TestCompRoot_TranslateSubscribeValidKey (0.00s)
=== RUN TestCompRoot_FillXcvrLaneInfo_AllPaths
=== RUN TestCompRoot_FillXcvrLaneInfo_AllPaths/Success_Path-Create_channel_and_fill_valid_lane_info
=== RUN TestCompRoot_FillXcvrLaneInfo_AllPaths/Error_Path-Lane_index_exceeds_XCVR_LANE_LIMIT_bounds
--- PASS: TestCompRoot_FillXcvrLaneInfo_AllPaths (0.00s)
--- PASS: TestCompRoot_FillXcvrLaneInfo_AllPaths/Success_Path-Create_channel_and_fill_valid_lane_info (0.00s)
--- PASS: TestCompRoot_FillXcvrLaneInfo_AllPaths/Error_Path-Lane_index_exceeds_XCVR_LANE_LIMIT_bounds (0.00s)
=== RUN TestCompRoot_GetXcvrInfoFromDb_AllPaths
=== RUN TestCompRoot_GetXcvrInfoFromDb_AllPaths/TRANSCEIVER_TBL_Missing
=== RUN TestCompRoot_GetXcvrInfoFromDb_AllPaths/TRANSCEIVER_DOM_Missing
--- PASS: TestCompRoot_GetXcvrInfoFromDb_AllPaths (0.00s)
--- PASS: TestCompRoot_GetXcvrInfoFromDb_AllPaths/TRANSCEIVER_TBL_Missing (0.00s)
--- PASS: TestCompRoot_GetXcvrInfoFromDb_AllPaths/TRANSCEIVER_DOM_Missing (0.00s)
=== RUN TestCompRoot_CreateCompAndFuncCall_LoopExecution
--- PASS: TestCompRoot_CreateCompAndFuncCall_LoopExecution (0.00s)
=== RUN TestCompRoot_XcvwStatusAndFormFactor_AllPaths
=== RUN TestCompRoot_XcvwStatusAndFormFactor_AllPaths/FormFactorType_Branches
=== RUN TestCompRoot_XcvwStatusAndFormFactor_AllPaths/Status_Case-Inserted
=== RUN TestCompRoot_XcvwStatusAndFormFactor_AllPaths/Status_Case-Removed_or_Empty
=== RUN TestCompRoot_XcvwStatusAndFormFactor_AllPaths/Status_Case-Unknown_Default
--- PASS: TestCompRoot_XcvwStatusAndFormFactor_AllPaths (0.00s)
--- PASS: TestCompRoot_XcvwStatusAndFormFactor_AllPaths/FormFactorType_Branches (0.00s)
--- PASS: TestCompRoot_XcvwStatusAndFormFactor_AllPaths/Status_Case-Inserted (0.00s)
--- PASS: TestCompRoot_XcvwStatusAndFormFactor_AllPaths/Status_Case-Removed_or_Empty (0.00s)
--- PASS: TestCompRoot_XcvwStatusAndFormFactor_AllPaths/Status_Case-Unknown_Default (0.00s)
=== RUN TestCompRoot_ConvAndFillDBValues_AllPaths
=== RUN TestCompRoot_ConvAndFillDBValues_AllPaths/All_Fields_Valid-Hits_success_conversions
=== RUN TestCompRoot_ConvAndFillDBValues_AllPaths/Parse_Failures-Hits_all_else_block_logging_lines
--- PASS: TestCompRoot_ConvAndFillDBValues_AllPaths (0.00s)
--- PASS: TestCompRoot_ConvAndFillDBValues_AllPaths/All_Fields_Valid-Hits_success_conversions (0.00s)
--- PASS: TestCompRoot_ConvAndFillDBValues_AllPaths/Parse_Failures-_Hits_all_else_block_logging_lines (0.00s)
=== RUN TestCompRoot_ConvAndFillDBValues_ErrorPaths
--- PASS: TestCompRoot_ConvAndFillDBValues_ErrorPaths (0.00s)
=== RUN TestCompRoot_StringMethods_AllPaths
=== RUN TestCompRoot_StringMethods_AllPaths/PathType_AllPaths
=== RUN TestCompRoot_StringMethods_AllPaths/PathType_StatePaths
=== RUN TestCompRoot_StringMethods_AllPaths/PathType_999
=== RUN TestCompRoot_StringMethods_AllPaths/ComponentType_CompTypeInvalid
=== RUN TestCompRoot_StringMethods_AllPaths/ComponentType_CompTypeXcvr
=== RUN TestCompRoot_StringMethods_AllPaths/ComponentType_CompTypeIC
=== RUN TestCompRoot_StringMethods_AllPaths/ComponentType_999
--- PASS: TestCompRoot_StringMethods_AllPaths (0.00s)
--- PASS: TestCompRoot_StringMethods_AllPaths/PathType_AllPaths (0.00s)
--- PASS: TestCompRoot_StringMethods_AllPaths/PathType_StatePaths (0.00s)
--- PASS: TestCompRoot_StringMethods_AllPaths/PathType_999 (0.00s)
--- PASS: TestCompRoot_StringMethods_AllPaths/ComponentType_CompTypeInvalid (0.00s)
--- PASS: TestCompRoot_StringMethods_AllPaths/ComponentType_CompTypeXcvr (0.00s)
--- PASS: TestCompRoot_StringMethods_AllPaths/ComponentType_CompTypeIC (0.00s)
--- PASS: TestCompRoot_StringMethods_AllPaths/ComponentType_999 (0.00s)
=== RUN TestCompRoot_GetXcvrInfoFromDb_FullSuccess
--- PASS: TestCompRoot_GetXcvrInfoFromDb_FullSuccess (0.00s)
=== RUN TestCompRoot_TranslateSubscribe_LoggingPath
xfmr_platform_test.go:1397: Warning: dbDataMap is still empty. Trying fallback wildcard style key...
--- PASS: TestCompRoot_TranslateSubscribe_LoggingPath (0.00s)
PASS
coverage: 3.8% of statements in ../translib/transformer