Граф коммитов

13 Коммитов

Автор SHA1 Сообщение Дата
Andrea Spadaccini 504e372b05
fix: remove () from type name in tests (#70)
Tests are failing on pwsh 7.4 because it stopped accepting `'System.Collections.ArrayList()'` as an argument to `New-Object`.

Removing the extra parentheses should fix the issue.
2024-01-03 17:39:21 +01:00
Andrea Spadaccini bc7b139c4f
Add CmdletBinding attribute to all cmdlets (#55)
This will allow, among other things, propagation of the ErrorAction
parameter, and correctly inhibit output when needed.

This behavior is tested in a new test for Get-FeatureFlagConfigFromFile.

Fixes Lack of CmdletBinding prevents ErrorAction from propagating #53
2023-05-11 08:09:54 +02:00
Andrea Spadaccini 631b9dfee0
fix: pin Pester to 4.10.1 for compatibility with pwsh 6.0.4 (#44)
* fix: pin Pester to 4.10.1

This makes tests work under PowerShell 6.0.4.

Also, import the FeatureFlags module first in run-tests.ps1, so that any failures in importing the module are detected early.

* fix: remove BeforeAll/AfterAll

They don't seem to work well with Pester 4.10.1.
2022-07-08 14:11:42 +02:00
Andrea Spadaccini cc8cab17b2
fix: make Docker tests fail properly (#42)
fix: make tests fail properly

* terminate run-tests.ps1 on the first error;
* split restore and test commands in Dockerfile.
2022-07-07 21:42:35 +02:00
Andrea Spadaccini b67eaff1cd
feat: use Test-Json whenever possible (#39)
This will remove the dependency from external assemblies in
PowerShell >= 6.1.0, and therefore increase compatibility by
removing the possibility of assembly conflicts or assembly loading
errors.
2022-07-07 16:31:31 +02:00
Andrea Spadaccini c0322b0a53
feat(test): improve test Dockerfile (#38)
Install cURL if needed, and use a multi-stage build to have a cleaner image.
2022-07-07 15:02:48 +02:00
Andrea Spadaccini da348aa657
feat(test): docker image and small improvements (#37)
* add a Docker image to be used to test with multiple pwsh versions;
* improve run-tests.ps1 output;
* remove unnecessary run-tests.ps1 parameter.
2022-07-07 13:58:38 +02:00
Andrea Spadaccini a88b40aac3
feat: migrate CI to Github Actions (#27)
Migrate CI from Azure Pipelines to GitHub Actions, point it to the main branch.
2020-12-25 23:15:44 +00:00
Andrea Spadaccini 0742b2035b
Blacklist → denylist, whitelist → allowlist (#20)
Since this is an incompatible change, also bump up version to 2.0.0
(major version change, to signal incompatible API).
2020-06-12 13:39:17 +01:00
Andrea Spadaccini c4567e4946 Fail tests if the module cannot be imported 2020-06-11 18:37:21 +01:00
Andrea Spadaccini 9a7f465f26 Create module definition (psd1)
Work towards the resolution of #2 (Publish the script on the PowerShell
Gallery)
2019-07-29 18:47:06 +01:00
Andrea Spadaccini d8c467a2d7 Move tests and related helper in the test dir 2019-07-29 17:31:07 +01:00
Andrea Spadaccini 266db88fd3 Add first version of PowerShell-FeatureFlags
There is still much to do to clean it up and make it more useful, but it
makes sense to publish the code as it is for now.
2019-07-23 18:00:58 +01:00