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

Get-DbaServerRoleMember - Fix Login parameter being overwritten #8496

Merged
merged 4 commits into from
Aug 18, 2022

Conversation

ClaudioESSilva
Copy link
Collaborator

Type of Change

  • Bug fix (non-breaking change, fixes Get-DbaServerRoleMember only honors -Login parameter on 1st instance of the list #8495)
  • New feature (non-breaking change, adds functionality, fixes # )
  • Breaking change (effects multiple commands or functionality, fixes # )
  • Ran manual Pester test and has passed (.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/dataplat/appveyor-lab ?
  • Unit test is included
  • Documentation
  • Build system

Purpose

When using more than one instance and the -Login parameter, the latter is overwritten and the filter won't work for the 2nd and subsequent instances on the collection of instances.

Approach

Rename the variable that holds the final list of logins per instance.

Commands to test

Get-DbaServerRoleMember -SqlInstance "localhost:14333", "localhost:14334" -Login "sqladmin"

Screenshots

Before:
image

After:
image

Learning

@potatoqualitee
Copy link
Member

Tearing it UP! 🥳

Copy link
Member

@potatoqualitee potatoqualitee left a comment

Choose a reason for hiding this comment

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

Changes totally make sense.

@potatoqualitee
Copy link
Member

Unfortunately, there are legitimate failures, so I'll wait to merge once tests pass

@ClaudioESSilva
Copy link
Collaborator Author

I'm confused. The 3 failed tests on the changed command are the ones that weren't touched. 🤔

@potatoqualitee
Copy link
Member

I figured it was a related failure? 🧐

@ClaudioESSilva
Copy link
Collaborator Author

My fault @potatoqualitee.
The machine is always right, right? 😂

All green 😄

@potatoqualitee
Copy link
Member

ayyyy! tests, tests tests 🥳

@potatoqualitee potatoqualitee merged commit c8e3201 into development Aug 18, 2022
@potatoqualitee potatoqualitee deleted the Fix_Get-DbaServerRoleMember branch August 18, 2022 11:36
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.

Get-DbaServerRoleMember only honors -Login parameter on 1st instance of the list
2 participants