-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMacs.Tests.ps1
73 lines (59 loc) · 1.62 KB
/
Macs.Tests.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Copyright 2020, Alexis La Goutte <alexis dot lagoutte at gmail dot com>
#
# SPDX-License-Identifier: Apache-2.0
#
. ../common.ps1
BeforeAll {
Connect-ArubaCX @invokeParams
}
#Only Basic check because no neighbor... (need to add some peer switch)
Describe "Get (Vlan) Macs (Mac Address Table)" {
BeforeAll {
Add-ArubaCXVlans -id $pester_vlan -name pester_vlan
}
It "Get MACs not throw an error" {
{
Get-ArubaCXMACs
} | Should -Not -Throw
}
It "Get MACs with a vlan ($pester_vlan) Does not throw an error" {
{
Get-ArubaCXMACs -vlan $pester_vlan
} | Should -Not -Throw
}
It "Get MACs with a pipeline vlan ($pester_vlan) Does not throw an error" {
{
Get-ArubaCXVlans -id $pester_vlan | Get-ArubaCXMACs
} | Should -Not -Throw
}
Context "Depth" {
It "Get Neighbor with depth equal 1" {
{
Get-ArubaCXMACs -depth 1
} | Should -Not -Throw
}
It "Get MACs with depth equal 2" {
{
Get-ArubaCXMACs -depth 2
} | Should -Not -Throw
}
It "Get MACs with depth equal 3" {
{
Get-ArubaCXMACs -depth 3
} | Should -Not -Throw
}
It "Get MACs with depth equal 4" {
{
Get-ArubaCXMACs -depth 4
} | Should -Not -Throw
}
}
AfterAll {
Get-ArubaCXVlans -id $pester_vlan | Remove-ArubaCXVlans -confirm:$false
#Reverse CheckPoint ?
}
}
AfterAll {
Disconnect-ArubaCX -confirm:$false
}