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

Remove running hqrmtest from task 'test' (and instead run it indvidually) #389

Open
johlju opened this issue Jun 9, 2022 · 1 comment
Open
Labels
good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community. tests The issue or pull request is about tests only.

Comments

@johlju
Copy link
Collaborator

johlju commented Jun 9, 2022

Problem description

When running the build script to test a specific test the hqrmtest are also run which takes time in the development process.

.\build.ps1 -Tasks test -PesterPath .\tests\Unit\Public\Get-BuildVersion.tests.ps1 -CodeCoverageThreshold 1

Verbose logs

Pester v5.3.3

Starting discovery in 1 files.
Discovery found 12 tests in 34ms.
Starting code coverage.
Code Coverage preparation finished after 2165 ms.
Running tests.

Running tests from 'C:\source\Sampler\tests\Unit\Public\Get-BuildVersion.tests.ps1'
Describing Get-BuildVersion
...
===============================================================================
                        INVOKE HQRM TESTS
Making sure the Module meets some quality standard (help, tests)
-------------------------------------------------------------------------------
...
Done /test/hqrmtest/Invoke_HQRM_Tests_Stop_On_Fail/Fail_Build_If_HQRM_Tests_Failed 00:00:00.0999452
Done /test/hqrmtest/Invoke_HQRM_Tests_Stop_On_Fail 00:00:17.0173025
Done /test/hqrmtest 00:00:17.0180906
Done /test 00:00:29.6944551

How to reproduce

Running this will run the hqrmtest:

.\build.ps1 -Tasks test -PesterPath .\tests\Unit\Public\Get-BuildVersion.tests.ps1 -CodeCoverageThreshold 1

Expected behavior

Not to run the task hqrmtest

Current behavior

Runs the task hqrmtest.

Suggested solution

Remove this line from the meta build task test:

- hqrmtest

Add a new job to the Azure Pipeline stage Test:

Example: https://github.com/dsccommunity/DscResource.Common/blob/c816a0951588a7d01481613bfab85fa7600aa830/azure-pipelines.yml#L52-L78

Optionally: Create a new informational meta task that can be run for the meta build task test that suggests that the user also runs the HQRM tests before PR by running .\build.ps1 -Tasks hqrmtest.

Operating system the target node is running

n/a

PowerShell version and build the target node is running

n/a

Module version used

main branch
@johlju
Copy link
Collaborator Author

johlju commented Jun 9, 2022

This has correlation with issue #387.

@johlju johlju added help wanted The issue is up for grabs for anyone in the community. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub tests The issue or pull request is about tests only. labels Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub 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

1 participant