mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-16 03:05:47 +00:00
Tests: Add Initial support of Integration (using Pester v5)
This commit is contained in:
parent
9dd6bc2b0e
commit
28ebd632b7
3 changed files with 33 additions and 0 deletions
1
Tests/.gitignore
vendored
Normal file
1
Tests/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
credential.ps1
|
||||
19
Tests/common.ps1
Normal file
19
Tests/common.ps1
Normal 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...
|
||||
13
Tests/credential.example.ps1
Normal file
13
Tests/credential.example.ps1
Normal 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"
|
||||
Loading…
Add table
Reference in a new issue