Comments (5)
One thing I ran into is that I didn't have script execution set to Unrestricted so the integration tests failed on my test box. This isn't the case on AppVeyor (which is why it passes just fine).
So we'll want to Set this to unrestricted before running the integration tests and then set it back to what it was at the end.
I'll include this in the PR for Issue #44.
from networkingdsc.
Another idea for this is that the Header/Footer for the Unit tests should also go in with these templates.
I've noticed that the Unit Test and Integration Test header/footers are almost identical in function (the only difference is which module to load). So in my latest changes (for Issue #47 ) I've changed the Header and Footer of both Unit and Integration tests so they are identical except for the first three lines which just contain the module names and relative paths. Perhaps you could take a look at this when I submit the PR and give me your thoughts?
Also, I'm using some form of this code in every module I work on, but it's often slightly different (because of when I copied or pasted it etc) - which causes all sorts of testing headaches. So, I think Ideally at some point all of this header/footer code should go into some helper module (like DSCResource.tests/HelperTests.psm1 - because that code is already pulled in most AppVeyor configs). I think we should try and avoid code repetition as much as possible. But that discussion could be left for another date.
Right, back to it!
Cheers
from networkingdsc.
That's a great idea! Please send the PR into DscResource.Tests repo once you're ready.
I also agree template for Unit tests would be helpful as well to have a proper setup/cleanup in place.
from networkingdsc.
Cool! Once we've finalized the Unit/Integration tests headers/footers I'll look at moving them into TestHelpers.psm1 👍
In PR #52 I've managed to synchronize the Header/Footer code for both Unit and Integration tests, so we should only need a single Start-TestFramework/Stop-TestFramework that will work for either. Not really sure of the right verbs to use here though.
from networkingdsc.
Going to close this one as we have the templates in this resource, getting them broadly will be up to PowerShell/DscResource.Tests#11
from networkingdsc.
Related Issues (20)
- NetAdapterBinding: Use of State & CurrentState Properties is non-idiomatic HOT 6
- IpConfiguration: Can't configure IPv4 address on adapter that only has IPv6 on it
- Update Sampler Build Tasks
- Enable Code Coverage Reporting
- PowerShell-DLM
- Resource parameter naming inconsistent HOT 1
- Include hidden adapters by default? HOT 3
- Remove group of FW rules HOT 1
- NetAdapterAdvancedProperty Constantly Re-Running
- Issue with Networkteaminterface when vlanid is used
- Problem with DSC Automate Account
- Update Azure DevOps Pipeline Images
- Update CI Pipeline Files from Latest Pattern
- Intermittent Integration Test Failures on Windows Server 2022
- Netbios: Fails to disable when NIC has link down HOT 6
- Correct Changelog.md Heading HOT 3
- DnsServerAddress: Fails when trying to rename network adapter when running Test
- NetBios resource failing for Azure VMs with Accelerated Networking enabled
- Firewall resource isn't properly identifying some built-in rules on Windows Server (2019 and 2022 tested) HOT 5
- The first byte of the proxy settings binary was '60' but should have been 0x46. 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 networkingdsc.