Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Add some new testcases to dialin and dialout mode#28

Open
MuLinForest wants to merge 2 commits intosonic-net:masterfrom
MuLinForest:newTestcases
Open

Add some new testcases to dialin and dialout mode#28
MuLinForest wants to merge 2 commits intosonic-net:masterfrom
MuLinForest:newTestcases

Conversation

@MuLinForest
Copy link
Contributor

  • In gnmi_server/server_test.go
    Add getting queues tests and non-db data test. Since the non-db data could not be known in advance, so the return data is removed and it only compares with the path to verify.
    • TestGnmiGET:
      • Get COUNTERS:Ethernet68 Queues
      • Get COUNTERS (use vendor alias):Ethernet68/1 Queues
      • Get COUNTERS:Ethernet* Queues
      • get non-db platform cpu
    • TestGnmiSubscribe:
      • poll query for platform/cpu
  • In dialout/dialout_client/dialout_client_test.go
    Add periodic report type test. The non-db response is verified by path. Therefore, I add a new function to compare the path.
    • DialOut to first collector in periodic mode (COUNTERS_PORT_NAME_MAP)
    • DialOut to first collector in periodic mode (COUNTERS/Ethernet*)
    • DialOut to second collector in periodic mode upon failure of first collector (COUNTERS/Ethernet68/Queues)
    • DialOut to second collector in periodic mode upon failure of first collector (platform/cpu)

* In gnmi_server/server_test.go
  Add getting queues tests and non-db data test.
  TestGnmiGET:
  * Get COUNTERS:Ethernet68 Queues
  * Get COUNTERS (use vendor alias):Ethernet68/1 Queues
  * Get COUNTERS:Ethernet* Queues
  * get non-db platform cpu
  TestGnmiSubscribe:
  * poll query for platform/cpu
* In dialout/dialout_client/dialout_client_test.go
  Add periodic report type test
  * DialOut to first collector in periodic mode (COUNTERS_PORT_NAME_MAP)
  * DialOut to first collector in periodic mode (COUNTERS/Ethernet*)
  * DialOut to second collector in periodic mode upon failure of first collector (COUNTERS/Ethernet68/Queues)
  * DialOut to second collector in periodic mode upon failure of first collector (platform/cpu)
@lguohan lguohan requested a review from hui-ma May 5, 2020 00:33
@MuLinForest
Copy link
Contributor Author

@hui-ma hi, could you please help to review

@hui-ma hui-ma requested a review from pra-moh May 19, 2020 00:52
Response: &pb.SubscribeResponse_Update{
Update: &pb.Notification{
//Timestamp: GetTimestamp(),
//Prefix: prefix,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it is removed.

elem: <name: "COUNTERS" >
elem: <name: "Ethernet68" >
elem: <name: "Queues" >
`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra space?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it is removed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants