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

SqlLogin: Added and amended integration tests for logins of 'SqlLogin' type (Fixes #361, #792, #1032, #1050, #1634) #1652

Merged
merged 71 commits into from
Jan 12, 2021

Commits on Dec 13, 2020

  1. Configuration menu
    Copy the full SHA
    1918a9c View commit details
    Browse the repository at this point in the history
  2. Added condition in 'Get-ServerProtocolObject' to throw exception if $…

    …serverInstance is not obtained
    SphenicPaul committed Dec 13, 2020
    Configuration menu
    Copy the full SHA
    557c9e7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fbcaf5b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a3dd55f View commit details
    Browse the repository at this point in the history
  5. Updated 'Get-ServerProtocolObject' to pass $ServerName into 'FailedTo…

    …ObtainServerInstance' error message
    SphenicPaul committed Dec 13, 2020
    Configuration menu
    Copy the full SHA
    8a06161 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    a7c62d3 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2020

  1. Configuration menu
    Copy the full SHA
    cdd1197 View commit details
    Browse the repository at this point in the history
  2. Updated 'DSC_SqlLogin_AddLoginDscUser4_Config' to create login as 'Ds…

    …cUser4Name', property value, not 'Admin_UserName' property value
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    e66174b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9dd2d99 View commit details
    Browse the repository at this point in the history
  4. Removed 'Admin_Password2' configuration property and made use of 'Dsc…

    …User4Pass1' and 'DscUser4Pass2' properties in 'SqlLogin', integration test, configuration data.
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    34691d4 View commit details
    Browse the repository at this point in the history
  5. Added 'SqlDatabaseUser' resource into 'DSC_SqlLogin_AddLoginDscUser4_…

    …Config', integration test, configuration
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    3d7d15c View commit details
    Browse the repository at this point in the history
  6. Added 'DefaultDatabase' property assignment to 'DSC_SqlLogin_AddLogin…

    …DscUser4_Config' and 'DSC_SqlLogin_UpdateLoginDscUser4_Config', integration test configurations
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    092554b View commit details
    Browse the repository at this point in the history
  7. Added integration tests for 'SqlLogin_AddLoginDscUser4_Config' to ens…

    …ure new SQL login can connect into the (correct, default) database
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    bfe3a4a View commit details
    Browse the repository at this point in the history
  8. Added 'SqlLogin_UpdateLoginDscUser4_Config', integration tests (simil…

    …ar to 'AddLoginDscUser4' ones, but with new password).
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    c73b168 View commit details
    Browse the repository at this point in the history
  9. Added 'LoginMustChangePassword', 'LoginPasswordExpirationEnabled' and…

    … 'LoginPasswordPolicyEnforced' parameter assertions to 'SqlLogin' resource, integration tests for 'SqlLogin' login types.
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    768999d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9845c11 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e79b349 View commit details
    Browse the repository at this point in the history
  12. Updated 'Test-TargetResource' for 'SqlLogin' resource to return $fals…

    …e if 'Get-TargetResource' returns null
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    c3f3841 View commit details
    Browse the repository at this point in the history
  13. Added 'DSC_SqlLogin\Test-TargetResource' unit test for when 'Get-Targ…

    …etResource' returns a $null value
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    8320a6b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    30ed056 View commit details
    Browse the repository at this point in the history
  15. Updated 'SqlLogin', 'Test-TargetResource' to cater for an existing, '…

    …disabled' account (replacing incorrect 'if ($Disabled)' condition)
    SphenicPaul committed Dec 14, 2020
    Configuration menu
    Copy the full SHA
    0e43b48 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    d159c78 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2020

  1. Added/Used 'DscUser4DbRole' property and 'Integration_Test_SqlRole', …

    …'SqlRole' configuration to 'Sqlogin', integration config to support connection into database
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    97fc2c5 View commit details
    Browse the repository at this point in the history
  2. Updated 'SqlLogin' tests to use 'ServerName' (not 'NodeName') and inc…

    …lude 'InstanceName' in connection string. Also added tests for pre/post password change using 'Connect-SQL'.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    b19cb50 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    44858e5 View commit details
    Browse the repository at this point in the history
  4. Added $sqlConnection.Close() to the 'SqlLogin' integration tests to c…

    …lose any connection that is opened.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    996b8be View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4693871 View commit details
    Browse the repository at this point in the history
  6. Updated 'SqlLogin', integration test, 'DSC_SqlLogin_UpdateLoginDscUse…

    …r4_Config' configuration to leave 'LoginMustChangePassword', propert value as $false
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    1534d32 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a88ee76 View commit details
    Browse the repository at this point in the history
  8. Added condition to 'SqlLogin' resource to throw exception if 'MustCha…

    …ngePassword' is to be changed.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    9e89942 View commit details
    Browse the repository at this point in the history
  9. Added unit test for 'SqlLogin' when 'MustChangePassword' is to be upd…

    …ated/changed on an existing login.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    c323da5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    5b98d96 View commit details
    Browse the repository at this point in the history
  11. Corrected 'SqlLogin', 'LoginMustChangePassword' test assertion within…

    … 'UpdateLoginDscUser4' configuration, integration tests.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    61ec7c4 View commit details
    Browse the repository at this point in the history
  12. Updated 'SqlLogin', unit tests to ensure that 'LoginMustChangePasswor…

    …d' is not treated as a change that would throw an exception otherwise.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    bed3fcb View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c3e950e View commit details
    Browse the repository at this point in the history
  14. Updated 'DSC_SqlLogin.schema.mof' to include note around inability to…

    … change 'LoginMustChangePassword' value on a pre-existing SQL login.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    38c8c4a View commit details
    Browse the repository at this point in the history
  15. Updated 'SqlLogin', 'README.md' to include description around 'LoginM…

    …ustChangePassword' property.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    9b6a6bb View commit details
    Browse the repository at this point in the history
  16. Updated 'LoginMustChangePassword' parameter description on 'SqlLogin'…

    …, 'Set-TargetResource' function.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    3d15820 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a6112af View commit details
    Browse the repository at this point in the history
  18. Added '-Clear' switch to 'Wait-ForIdleLcm' function calls within 'Sql…

    …Login', integration tests.
    SphenicPaul committed Dec 15, 2020
    Configuration menu
    Copy the full SHA
    e892b0d View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    f12845e View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2020

  1. Updated 'SqlLogin', integration test, database pre-tidy up to set 'Se…

    …rver.ConnectionContext' properties rather than using 'ServerConnection' type.
    SphenicPaul committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    6ba3bf4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e776cf0 View commit details
    Browse the repository at this point in the history
  3. Updated 'SqlLogin', integration tests to take default database offlin…

    …e before it is deleted/tidied up
    SphenicPaul committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    0aa342e View commit details
    Browse the repository at this point in the history
  4. Updated 'SqlLogin' integration tests to move database tidy up into 'C…

    …ontext' for 'CleanupDependencies' configuration. Also removed admin account, server name prefix.
    SphenicPaul committed Dec 16, 2020
    Configuration menu
    Copy the full SHA
    ee691e9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6c4c3ca View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    61ab3fb View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2020

  1. Configuration menu
    Copy the full SHA
    44296ef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0db46c0 View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2021

  1. Updated 'DscUser4Pass1' and 'DscUser4Pass2' properties in 'SqlLogin',…

    … integration test configurations back to use default/similar passwords consistent with others.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    1f3d7c3 View commit details
    Browse the repository at this point in the history
  2. Added addition 'SqlLogin', integration tests to update the 'DscUser4'…

    … password back to the original one and confirm successful.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    c544ad2 View commit details
    Browse the repository at this point in the history
  3. Added additional note around 'DscUser4' password change into integrat…

    …ion tests, "README" file.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    4f63fe2 View commit details
    Browse the repository at this point in the history
  4. Updated names of 2 'SqlLogin', integration tests to update 'to correc…

    …t' to 'to connect to correct'.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    392df9c View commit details
    Browse the repository at this point in the history
  5. Updated 'SqlLogin' documentation to attempt to clarify functionality …

    …around 'LoginMustChangePassword'.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    7b9090b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c2ef2e1 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #1 from dsccommunity/main

    Merging changes from 'dsccommunity/SqlServerDsc' main.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    326d424 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    8ee45cd View commit details
    Browse the repository at this point in the history
  9. Updated 'CleanupDependencies', 'SqlLogin' integration test to use ori…

    …ginal 'DscUser4', login password.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    794c07d View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8d1426c View commit details
    Browse the repository at this point in the history
  11. Removed 'DSC_SqlLogin\Test-TargetResource', unit test that asserts ar…

    …ound functionality if 'Get-TargetResource' returns $null.
    SphenicPaul committed Jan 10, 2021
    Configuration menu
    Copy the full SHA
    2c54fa2 View commit details
    Browse the repository at this point in the history

Commits on Jan 11, 2021

  1. Configuration menu
    Copy the full SHA
    855ffca View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d39ee7a View commit details
    Browse the repository at this point in the history
  3. Moved 3, $sqlConnection = New-Object assignments into 'Should -Not -T…

    …hrow', integration test, scriptblocks.
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    c8e1123 View commit details
    Browse the repository at this point in the history
  4. Updated '...to connect to correct, SQL instance, default database', '…

    …SqlLogin' integration tests to obtain default database within script block (and assert no exception).
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    25c275b View commit details
    Browse the repository at this point in the history
  5. Updated second, 'AddLoginDscUser4_Config' comment to use comment bloc…

    …k (rather than line comments).
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    31303e8 View commit details
    Browse the repository at this point in the history
  6. Added 'When preparing database, dependencies cleanup' context to 'Sql…

    …Login', integration tests (seperating from 'CleanupDependencies' test).
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    9a3ddcb View commit details
    Browse the repository at this point in the history
  7. Removed, non-required brackets from 'When preparing database, depende…

    …ncies cleanup' context.
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    b279b52 View commit details
    Browse the repository at this point in the history
  8. Reversed update order of 'PasswordExpirationEnabled' and 'PasswordPol…

    …icyEnforced' within 'Set-TargetResource' in 'SqlLogin' resource.
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    b6e8159 View commit details
    Browse the repository at this point in the history
  9. Updated 'CHANGELOG' to include reversing of 'PasswordExpirationEnable…

    …d' and 'PasswordPolicyEnforced' in `SqlLogin` resource.
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    2b5434b View commit details
    Browse the repository at this point in the history
  10. Added comments around the ordering of updates to 'PasswordExpirationE…

    …nabled' and 'PasswordPolicyEnforced'.
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    d2db2e0 View commit details
    Browse the repository at this point in the history
  11. Updated 'Set-TargetResource' in 'SqlLogin' to update 'PasswordPolicyE…

    …nforced' and 'PasswordExpirationEnabled' as a single update.
    SphenicPaul committed Jan 11, 2021
    Configuration menu
    Copy the full SHA
    d0d0120 View commit details
    Browse the repository at this point in the history