Skip to content

[Do not merge] Fix error message formatting in test case#5120

Open
singhavnish2516 wants to merge 1 commit intomainfrom
singhavnish2516
Open

[Do not merge] Fix error message formatting in test case#5120
singhavnish2516 wants to merge 1 commit intomainfrom
singhavnish2516

Conversation

@singhavnish2516
Copy link
Contributor

No description provided.

@singhavnish2516 singhavnish2516 requested a review from a team as a code owner February 23, 2026 05:52
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @singhavnish2516, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a minor textual inconsistency within a gNMI system test. The change ensures that an error message displayed upon an unexpected error condition adheres to a consistent capitalization style, enhancing the clarity of test output.

Highlights

  • Test Error Message Consistency: Standardized the capitalization of an error message within the TestGNMIGet function for improved readability.
Changelog
  • feature/gnmi/tests/system_gnmi_get_test/system_gnmi_get_test.go
    • Corrected the capitalization of an error message string.
Activity
  • No specific activity (comments, reviews) has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@OpenConfigBot
Copy link

Pull Request Functional Test Report for #5120 / ea798c3

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
gNMI-1.9: Get requests
8844f7b9 Log
Cisco 8000E status
gNMI-1.9: Get requests
81fa2c4c Log
Cisco XRd status
gNMI-1.9: Get requests
82373903 Log
Juniper ncPTX status
gNMI-1.9: Get requests
90af92b8 Log
Nokia SR Linux status
gNMI-1.9: Get requests
a375728f Log
Openconfig Lemming status
gNMI-1.9: Get requests
5ecb0217 Log

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
gNMI-1.9: Get requests
Cisco 8808 status
gNMI-1.9: Get requests
Juniper PTX10008 status
gNMI-1.9: Get requests
Nokia 7250 IXR-10e status
gNMI-1.9: Get requests

Help

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the capitalization of a single error message in a test file. While the change aligns with Go's best practices for logging functions, it introduces a stylistic inconsistency within the file, as other similar error messages remain uncapitalized. My review suggests reverting this change to maintain local consistency, with a recommendation to address all instances in a separate, comprehensive update to ensure a consistent coding style across the file.

t.Fatalf("did not get expected error, got: %v, want: %v", err, tt.wantErrCode)
case err != nil && tt.wantErrCode == codes.OK:
t.Fatalf("got unexpected error, got: %v, want OK", err)
t.Fatalf("Got unexpected error, got: %v, want OK", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

While capitalizing error messages for logging functions like t.Fatalf is generally good practice according to Go style guides, this change introduces an inconsistency within this file. All other t.Fatalf calls here begin with a lowercase letter. To maintain local consistency, it's preferable to either update all t.Fatalf calls in this file to be capitalized in this or a subsequent PR, or revert this single change for now.

Suggested change
t.Fatalf("Got unexpected error, got: %v, want OK", err)
t.Fatalf("got unexpected error, got: %v, want OK", err)
References
  1. The repository style guide requires following Go best practices for a consistent look and feel. This change, while following one interpretation of Go's error message capitalization rules, introduces inconsistency within this file where other t.Fatalf calls use lowercase. For better maintainability, style should be consistent within a file. (link)
  2. When a code pattern is used consistently across the codebase, maintain that consistency rather than making a localized change for readability, unless there is a compelling reason to refactor all occurrences. This principle extends to maintaining consistency within a file.

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.

2 participants