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

Fix PartnerServerName check in GetAzureSqlDatabaseReplicationLink.cs #13433

Merged
merged 3 commits into from
Nov 9, 2020

Conversation

alecbain
Copy link
Contributor

@alecbain alecbain commented Nov 6, 2020

Description

PartnerServerName (an optional parameter) is currently checking invocation by examining the value of the variable PartnerServerName instead of string literal "PartnerServerName". When invoking the cmdlet, it yields unexpected behavior as check never passes and it invokes as if PartnerServerName parameter was not passed.

Added double quotes around PartnerServerName to check for key.

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
    • the markdown help files have been regenerated using the commands listed here

Fix check for PartnerServerName param check to look for string literal instead of value of variable.
Co-authored-by: Yeming Liu <Yeming.Liu@microsoft.com>
Copy link
Member

@isra-fel isra-fel left a comment

Choose a reason for hiding this comment

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

LGTM

@isra-fel
Copy link
Member

isra-fel commented Nov 9, 2020

/azp run azure-powershell - windows-powershell

@azure-pipelines
Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@isra-fel isra-fel merged commit 211fadd into master Nov 9, 2020
@isra-fel isra-fel deleted the alecbain-patch-1 branch November 9, 2020 02:35
greenms pushed a commit to greenms/azure-powershell that referenced this pull request Nov 13, 2020
…zure#13433)

* Fix PartnerServerName check

Fix check for PartnerServerName param check to look for string literal instead of value of variable.

* Update ChangeLog.md

* Use nameof to avoid magic string

Co-authored-by: Yeming Liu <Yeming.Liu@microsoft.com>

Co-authored-by: Yeming Liu <Yeming.Liu@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants