Tests: Add Initial support of Integration (using Pester v5)

This commit is contained in:
Alexis La Goutte 2021-07-28 22:16:39 +02:00
parent 9dd6bc2b0e
commit 28ebd632b7
3 changed files with 33 additions and 0 deletions

1
Tests/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
credential.ps1

19
Tests/common.ps1 Normal file
View file

@ -0,0 +1,19 @@
#
# Copyright 2021, Alexis La Goutte <alexis dot lagoutte at gmail dot com>
#
# SPDX-License-Identifier: Apache-2.0
#
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingConvertToSecureStringWithPlainText", "")]
Param()
$script:pester_site1 = "pester_site1"
$Credential = New-Object System.Management.Automation.PSCredential("username", (ConvertTo-SecureString $token -AsPlainText -Force))
$script:invokeParams = @{
hostname = $hostname;
Credential = $Credential;
SkipCertificateCheck = $true;
}
. ../credential.ps1
#TODO: Add check if no ipaddress/token info...

View file

@ -0,0 +1,13 @@
#
# Copyright 2021, Alexis La Goutte <alexis dot lagoutte at gmail dot com>
#
# SPDX-License-Identifier: Apache-2.0
#
# Copy this file to credential.ps1 (on Tests folder) and change connection settings..
$script:hostname = "10.44.23.213"
$script:token = "aaaaaaaaaaaaaaaaaa"
#Uncomment if you want to personnalize some setting
#script:pester_site1 = "pester_site1"