Skip to content

Commit

Permalink
test(interface): Fixed tests for system and ipsec interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianni Stubbe committed Jul 25, 2023
1 parent 5456874 commit 5ac0d93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/probe/system_interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func TestSystemInterfaces(t *testing.T) {
}

em := `
# HELP fortigate_interface_link_up Whether the link is up or not
# HELP fortigate_interface_link_up Whether the link is up or not (not taking into account admin status)
# TYPE fortigate_interface_link_up gauge
fortigate_interface_link_up{alias="",name="b",parent="",vdom="root"} 0
fortigate_interface_link_up{alias="",name="internal1",parent="",vdom="infra"} 1
Expand Down
4 changes: 2 additions & 2 deletions pkg/probe/vpn_ipsec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestVPNIPSec(t *testing.T) {
# TYPE fortigate_ipsec_tunnel_transmit_bytes_total counter
fortigate_ipsec_tunnel_transmit_bytes_total{name="tunnel_1-sub",p2serial="1",parent="tunnel_1",vdom="root"} 1.424856e+07
fortigate_ipsec_tunnel_transmit_bytes_total{name="tunnel_1-sub",p2serial="12",parent="tunnel_1",vdom="root"} 1.424856e+07
# HELP fortigate_ipsec_tunnel_up Status of IPsec tunnel
# HELP fortigate_ipsec_tunnel_up Status of IPsec tunnel (0 - Down, 1 - Up)
# TYPE fortigate_ipsec_tunnel_up gauge
fortigate_ipsec_tunnel_up{name="tunnel_1-sub",p2serial="1",parent="tunnel_1",vdom="root"} 1
fortigate_ipsec_tunnel_up{name="tunnel_1-sub",p2serial="12",parent="tunnel_1",vdom="root"} 0
Expand Down Expand Up @@ -62,7 +62,7 @@ func TestVPNIPSecWithCommonP2Names(t *testing.T) {
fortigate_ipsec_tunnel_transmit_bytes_total{name="CommonP2",p2serial="25",parent="My VPN",vdom="root"} 3.1269542e+07
fortigate_ipsec_tunnel_transmit_bytes_total{name="mgmt",p2serial="1",parent="My VPN",vdom="root"} 0
fortigate_ipsec_tunnel_transmit_bytes_total{name="some-network",p2serial="14",parent="My VPN",vdom="root"} 112307
# HELP fortigate_ipsec_tunnel_up Status of IPsec tunnel
# HELP fortigate_ipsec_tunnel_up Status of IPsec tunnel (0 - Down, 1 - Up)
# TYPE fortigate_ipsec_tunnel_up gauge
fortigate_ipsec_tunnel_up{name="CommonP2",p2serial="22",parent="My VPN",vdom="root"} 0
fortigate_ipsec_tunnel_up{name="CommonP2",p2serial="23",parent="My VPN",vdom="root"} 1
Expand Down

0 comments on commit 5ac0d93

Please sign in to comment.