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

WebApplication: Integration test failing #606

Open
nickgw opened this issue May 30, 2022 · 0 comments
Open

WebApplication: Integration test failing #606

nickgw opened this issue May 30, 2022 · 0 comments
Labels
help wanted The issue is up for grabs for anyone in the community. tests The issue or pull request is about tests only.

Comments

@nickgw
Copy link
Contributor

nickgw commented May 30, 2022

Problem description

The two Get-DscConfiguration integration tests for WebApplication fail:

 It 'Should be able to call Get-DscConfiguration without throwing' {
      { Get-DscConfiguration -Verbose -ErrorAction Stop } | Should -Not -Throw
 }

Throws an error:

    [-] Should be able to call Get-DscConfiguration without throwing 5.24s
      Expected no exception to be thrown, but an exception "A general error occurred that is not covered by a more specific error code." was thrown from D:\a\1\s\tests\Integration\DSC_WebApplication.Integration.Tests.ps1:97 char:17
          +                 Get-DscConfiguration -Verbose -ErrorAction Stop
          +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
      98:             } | Should -Not -Throw
      at <ScriptBlock>, D:\a\1\s\tests\Integration\DSC_WebApplication.Integration.Tests.ps1: line 95

Verbose logs

[-] Should be able to call Get-DscConfiguration without throwing 5.24s
      Expected no exception to be thrown, but an exception "A general error occurred that is not covered by a more specific error code." was thrown from D:\a\1\s\tests\Integration\DSC_WebApplication.Integration.Tests.ps1:97 char:17
          +                 Get-DscConfiguration -Verbose -ErrorAction Stop
          +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
      98:             } | Should -Not -Throw
      at <ScriptBlock>, D:\a\1\s\tests\Integration\DSC_WebApplication.Integration.Tests.ps1: line 95


### DSC configuration

```powershell
#requires -Version 4
configuration DSC_WebApplication_Present
{
    Import-DscResource -ModuleName WebAdministrationDsc

    Node $AllNodes.NodeName
    {
        WebApplication WebApplication
        {
            Website = $Node.Website
            Ensure = 'Present'
            Name = $Node.WebApplication
            PhysicalPath = $Node.PhysicalPath
            WebAppPool = $Node.ApplicationPool
            ApplicationType = $Node.ApplicationType
            AuthenticationInfo = `
                DSC_WebApplicationAuthenticationInformation
                {
                    Anonymous = $Node.AuthenticationInfoAnonymous
                    Basic     = $Node.AuthenticationInfoBasic
                    Digest    = $Node.AuthenticationInfoDigest
                    Windows   = $Node.AuthenticationInfoWindows
                }
            PreloadEnabled = $Node.PreloadEnabled
            ServiceAutoStartEnabled = $Node.ServiceAutoStartEnabled
            ServiceAutoStartProvider = $Node.ServiceAutoStartProvider
            SslFlags = $Node.WebApplicationSslFlags
            EnabledProtocols = $Node.EnabledProtocols
        }
    }
}


### Suggested solution

refactor integration tests

### Operating system the target node is running

```text
All integration test OSes

PowerShell version and build the target node is running

5.1

xWebAdministration version

latest
@johlju johlju added help wanted The issue is up for grabs for anyone in the community. tests The issue or pull request is about tests only. labels Jun 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted The issue is up for grabs for anyone in the community. tests The issue or pull request is about tests only.
Projects
None yet
Development

No branches or pull requests

2 participants