Comments (5)
Fortunately this is an easy fix, unfortunately we don't have much in the way of unit testing on this module so it'll take more time to bootstrap up the test infastructure then it will to actually correct the problem. š
What we should decide on is if it should be required or not.
If we change the mof file to Required (which would remove the warning) we'd have to add it to the Get-TargetResource which personally I find a bit gross as we don't actually use the physical path.
If we actually remove the required parameter on the file we then have no way of enforcing (short of checking that the variable is null and throwing, which makes me think it should just be required. So I guess adding it to Get-TargetResource is the "better" option?
from webadministrationdsc.
I agree with @tysonjhayes final analysis. Physical-Path should be required. Perhaps it's an issue in DSC that anything other than the key properties are required for Get-TargetResource. Theoretically, only the key properties should be needed to get the resources.
from webadministrationdsc.
@TravisEz13 I've got a fix for this already and can copy/paste some of my tests from xNetworking to get this going pretty quickly. Should have something I can give back by tomorrow or so (assuming appveyor plays nice with me).
from webadministrationdsc.
OK so this is actually blocked on xDSCResourceDesigner having a bug in the embedded classes. This is fixed in the cDSCResourceDesigner. So I won't be able to test this until the bug in xDSCResourceDesigner is fixed. @TravisEz13 do we want to wait until xDSCResourceDesigner is fixed for me to submit this or should I go ahead?
from webadministrationdsc.
blocked because you cannot write proper tests?
How about we add placeholder tests for the resource designer tests and add a test that tries to calls a configuration without the parameter, and verify it throws. Example with the Registry Resource, and the ValueName parameter missing:
Describe -Name 'Example' -Fixture {
it -name 'ExampleIt' -test {
configuration ExampleConfig
{
Import-DscResource āModuleName āPSDesiredStateConfigurationā
Registry ExampleFile
{
Key = 'keyExample'
}
}
{
ExampleConfig
} | should throw "Errors occurred while processing configuration 'ExampleConfig'."
}
}
from webadministrationdsc.
Related Issues (20)
- xIisMimeTypeMapping: Make ConfigurationPath a non-mandatory parameter HOT 4
- xWebsite: finds certificates with no private key to bind to SSL. Doesn't choose a cert with most available time.
- xWebAppPool doesn't fail on state mis-match or reset running state when resetting state HOT 1
- xWebapppool will not compile using identitytype gMSA HOT 2
- xWebConfigProperty: Location is not supported HOT 2
- WebApplication: Physical path overwritten after desired state applied HOT 7
- xIisFeatureDelegation Failed to invoke DSC Set method: The request is not supported. HOT 7
- xWebApplication fails obtain desired state if multiple SSL flags are specified.
- xWebConfigPropertyCollection: Adding system.webServer/security/authorization fails Test-TargetResource HOT 3
- xWebAdministration: Rename master branch to main
- Parameter 'PhysicalPath' should point to existing path, on Azure File Share HOT 4
- Unable to configure IIS using PowerShell DSC Resource xWebAdministration v3.20 HOT 3
- Can you set multiple file extensions to allowed for request filtering? HOT 1
- Suported? - xWebSite - Windows Authentication - Advanced Settings/Providers HOT 2
- WebApplication: Integration test failing
- How to add credentials with empty password in xWebAppPool. HOT 2
- Confusing package names in PowerShell Gallery HOT 5
- Name will not take ".Net6 Core ", Net6 Core works but want the "." HOT 1
- WebAppPoolDefaults : Add Missing Configuration Items
- xWebAppPool and xWebApplication cannot delete entities in use and do nothing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webadministrationdsc.