Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Tests for Node Topologies #364

Conversation

harshitap26
Copy link
Contributor

@harshitap26 harshitap26 commented Dec 5, 2024

Description

  • PR to add Integration tests for adding and passing zone labels through the topologies.
  • Made changes to the function arguments for reading array config since we are using different config for the zoning tests.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
dell/csm#1612

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Integration tests successfully running for the added scenarios.
  Scenario: call NodeGetInfo                           # features/integration.feature:1009
    Given a VxFlexOS service                           # <autogenerated>:1 -> *feature
[iCallNodeGetInfo] Calling NodeGetInfo...
[nodeGetInfo] Calling NodeGetInfo...
INFO[0005] failed to probe node: rpc error: code = FailedPrecondition desc = DrvCfgQuerySystems: Request to query MDM failed : exit status 125 
DEBU[0005] Node labels: map[kubernetes.io/hostname:node1 zone.csi-vxflexos.dellemc.com:zoneA] 
DEBU[0005] MaxVolumesPerNode: 0                         
INFO[0005] Arrays: map[205f819048a7000f:0xc0003205b0]   
INFO[0005] Probing all arrays. Number of arrays: 1      
INFO[0005] default array is set to array ID: 205f819048a7000f 
INFO[0005] 205f819048a7000f is the default array, skipping VolumePrefixToSystems map update.  
INFO[0005] array 205f819048a7000f probed successfully   
INFO[0005] Zone found for node ID: , adding system ID: 205f819048a7000f to node topology 
DEBU[0005] NodeId: D2802C64-F3A7-4B5A-9035-6FEC669A2FB0 
    And I call NodeGetInfo with ""                     # <autogenerated>:1 -> *feature
2024/12/05 12:10:08 Node Accessibility segments:<key:"csi-vxflexos.dellemc.com/205f819048a7000f" value:"csi-vxflexos.dellemc.com" > segments:<key:"zone.csi-vxflexos.dellemc.com" value:"zoneA" > 
    Then a NodeGetInfo is returned with zone topology  # <autogenerated>:1 -> *feature
2024/12/05 12:10:08 Node Accessibility segments:<key:"csi-vxflexos.dellemc.com/205f819048a7000f" value:"csi-vxflexos.dellemc.com" > segments:<key:"zone.csi-vxflexos.dellemc.com" value:"zoneA" > 
array found  205f819048a7000f map[string]interface {}{"allSystemNames":"", "endpoint":"https://10.247.102.220", "insecure":true, "isDefault":true, "nasName":"", "password":"********", "systemID":"205f819048a7000f", "user":"admin"}
2024/12/05 12:10:08 array systemID 205f819048a7000f
    And a NodeGetInfo is returned with system topology # <autogenerated>:1 -> *feature
=== RUN   TestZoneIntegration/call_NodeGetInfo#01

  Scenario: call NodeGetInfo                                                # features/integration.feature:1016
    Given a VxFlexOS service                                                # <autogenerated>:1 -> *feature
[iCallNodeGetInfo] Calling NodeGetInfo...
[nodeGetInfo] Calling NodeGetInfo...
INFO[0005] failed to probe node: rpc error: code = FailedPrecondition desc = DrvCfgQuerySystems: Request to query MDM failed : exit status 125 
DEBU[0005] Node labels: map[invalid_zone_key:zoneA kubernetes.io/hostname:node1] 
DEBU[0005] MaxVolumesPerNode: 0                         
INFO[0005] Arrays: map[205f819048a7000f:0xc0003205b0]   
INFO[0005] Probing all arrays. Number of arrays: 1      
INFO[0005] default array is set to array ID: 205f819048a7000f 
INFO[0005] 205f819048a7000f is the default array, skipping VolumePrefixToSystems map update.  
INFO[0005] array 205f819048a7000f probed successfully   
INFO[0005] No zoning found for node ID: , adding system ID: 205f819048a7000f 
DEBU[0005] NodeId: D2802C64-F3A7-4B5A-9035-6FEC669A2FB0 
    And I call NodeGetInfo with "invalid_zone_key"                          # <autogenerated>:1 -> *feature
2024/12/05 12:10:08 Node Accessibility segments:<key:"csi-vxflexos.dellemc.com/205f819048a7000f" value:"csi-vxflexos.dellemc.com" > 
    Then a NodeGetInfo is returned without zone topology "invalid_zone_key" # <autogenerated>:1 -> *feature

4 scenarios (4 passed)
21 steps (21 passed)
854.519865ms
INFO[0005] gracefully stopped                           
--- PASS: TestZoneIntegration (5.86s)
    --- PASS: TestZoneIntegration/Create_publish,_unpublish,_and_delete_zone_volume (0.79s)
    --- PASS: TestZoneIntegration/Create_zone_volume_with_invalid_zone_information (0.00s)
    --- PASS: TestZoneIntegration/call_NodeGetInfo (0.04s)
    --- PASS: TestZoneIntegration/call_NodeGetInfo#01 (0.01s)
PASS
coverage: [no statements]
ok      github.com/dell/csi-vxflexos/v2/test/integration        5.900s
  • Tested the existing scenarios for NFS provisioning to verify the changes made to the function arguments of reading the config file
    integration-test.log

@harshitap26 harshitap26 merged commit 366b0eb into feature/multi-availability-zone Dec 6, 2024
6 checks passed
@harshitap26 harshitap26 deleted the usr/harshitap26/node_labels_integrationtests branch December 6, 2024 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants