Giter Site home page Giter Site logo

Comments (5)

PlagueHO avatar PlagueHO commented on August 28, 2024

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.

PlagueHO avatar PlagueHO commented on August 28, 2024

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.

KarolKaczmarek avatar KarolKaczmarek commented on August 28, 2024

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.

PlagueHO avatar PlagueHO commented on August 28, 2024

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.

tysonjhayes avatar tysonjhayes commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.