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

SqlServiceAccount: Returning MSFT_Credential instead of the ServiceAccountName #982

Closed
johlju opened this issue Dec 30, 2017 · 0 comments · Fixed by #987
Closed

SqlServiceAccount: Returning MSFT_Credential instead of the ServiceAccountName #982

johlju opened this issue Dec 30, 2017 · 0 comments · Fixed by #987
Assignees
Labels
bug The issue is a bug.

Comments

@johlju
Copy link
Member

johlju commented Dec 30, 2017

Details of the scenario you tried and the problem that is occurring:
The resource SqlServiceAccount should return the service account name as a string, but since the string is returned in the property ServiceAccount which is of type MSFT_Credential we get a credential object back.

[-] Should have set the resource and all the parameters should match 630ms
Expected: {APPVYR-WIN\svc-SqlSecondary}
But was:  {MSFT_Credential}
108:                 $resourceCurrentState.ServiceAccount | Should -Be ('{0}\{1}' -f $env:COMPUTERNAME, (Split-Path -Path $mockSqlServiceSecondaryAccountUserName -Leaf))

I suggest we add a read only property ServiceAccountName which returns the service account name as a string.

The DSC configuration that is using the resource (as detailed as possible):

SqlServiceAccount Integration_Test
{
    ServerName     = $Node.ServerName
    InstanceName   = 'MSSQLSERVER'
    ServiceType    = 'DatabaseEngine'
    ServiceAccount = $SqlServiceSecondaryCredential
    RestartService = $true
}

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:
n/a

What module (SqlServer or SQLPS) and which version of the module the DSC Target Node is running:
n/a

Version of the DSC module you're using, or 'dev' if you're using current dev branch:
Dev

@johlju johlju added bug The issue is a bug. in progress The issue is being actively worked on by someone. labels Dec 30, 2017
johlju added a commit to johlju/SqlServerDsc that referenced this issue Dec 30, 2017
- Added a read-only parameter ServiceAccountName so correctly returns the
  service account name as a string (issue dsccommunity#982).
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 1, 2018
- Added a read-only parameter ServiceAccountName so correctly returns the
  service account name as a string (issue dsccommunity#982).
johlju added a commit to johlju/SqlServerDsc that referenced this issue Jan 1, 2018
- Added a read-only parameter ServiceAccountName so correctly returns the
  service account name as a string (issue dsccommunity#982).
johlju added a commit that referenced this issue Jan 4, 2018
- Changes to SqlServerDsc
  - Added a README.md under Tests\Integration to help contributors to write
   integration tests.
  - Added 'Integration tests' section in the CONTRIBUTING.md.
- Changes to SqlServiceAccount
  - Added a read-only parameter ServiceAccountName so that the service account
    name is correctly returned as a string (issue #982).
  - Added integration tests (issue #980).
- Changes to SqlSetup
  - Cleaned up integration tests.
  - Added integration tests for installing a default instance of Database Engine.
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant