mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-20 15:49:55 +00:00
Add tests
This commit is contained in:
committed by
Theodor S. Midtlien
parent
cba77dda6f
commit
a3fe5347cb
@@ -94,6 +94,7 @@ var resp = &proto.StatusResponse{
|
|||||||
Ipv6: "fd00::100",
|
Ipv6: "fd00::100",
|
||||||
PubKey: "Some-Pub-Key",
|
PubKey: "Some-Pub-Key",
|
||||||
KernelInterface: true,
|
KernelInterface: true,
|
||||||
|
WgPort: 51820,
|
||||||
Fqdn: "some-localhost.awesome-domain.com",
|
Fqdn: "some-localhost.awesome-domain.com",
|
||||||
Networks: []string{
|
Networks: []string{
|
||||||
"10.10.0.0/24",
|
"10.10.0.0/24",
|
||||||
@@ -210,6 +211,7 @@ var overview = OutputOverview{
|
|||||||
IPv6: "fd00::100",
|
IPv6: "fd00::100",
|
||||||
PubKey: "Some-Pub-Key",
|
PubKey: "Some-Pub-Key",
|
||||||
KernelInterface: true,
|
KernelInterface: true,
|
||||||
|
WgPort: 51820,
|
||||||
FQDN: "some-localhost.awesome-domain.com",
|
FQDN: "some-localhost.awesome-domain.com",
|
||||||
NSServerGroups: []NsServerGroupStateOutput{
|
NSServerGroups: []NsServerGroupStateOutput{
|
||||||
{
|
{
|
||||||
@@ -369,6 +371,7 @@ func TestParsingToJSON(t *testing.T) {
|
|||||||
"netbirdIpv6": "fd00::100",
|
"netbirdIpv6": "fd00::100",
|
||||||
"publicKey": "Some-Pub-Key",
|
"publicKey": "Some-Pub-Key",
|
||||||
"usesKernelInterface": true,
|
"usesKernelInterface": true,
|
||||||
|
"wireguardPort": 51820,
|
||||||
"fqdn": "some-localhost.awesome-domain.com",
|
"fqdn": "some-localhost.awesome-domain.com",
|
||||||
"quantumResistance": false,
|
"quantumResistance": false,
|
||||||
"quantumResistancePermissive": false,
|
"quantumResistancePermissive": false,
|
||||||
@@ -487,6 +490,7 @@ netbirdIp: 192.168.178.100/16
|
|||||||
netbirdIpv6: fd00::100
|
netbirdIpv6: fd00::100
|
||||||
publicKey: Some-Pub-Key
|
publicKey: Some-Pub-Key
|
||||||
usesKernelInterface: true
|
usesKernelInterface: true
|
||||||
|
wireguardPort: 51820
|
||||||
fqdn: some-localhost.awesome-domain.com
|
fqdn: some-localhost.awesome-domain.com
|
||||||
quantumResistance: false
|
quantumResistance: false
|
||||||
quantumResistancePermissive: false
|
quantumResistancePermissive: false
|
||||||
@@ -579,12 +583,13 @@ FQDN: some-localhost.awesome-domain.com
|
|||||||
NetBird IP: 192.168.178.100/16
|
NetBird IP: 192.168.178.100/16
|
||||||
NetBird IPv6: fd00::100
|
NetBird IPv6: fd00::100
|
||||||
Interface type: Kernel
|
Interface type: Kernel
|
||||||
|
Wireguard port: %d
|
||||||
Quantum resistance: false
|
Quantum resistance: false
|
||||||
Lazy connection: false
|
Lazy connection: false
|
||||||
SSH Server: Disabled
|
SSH Server: Disabled
|
||||||
Networks: 10.10.0.0/24
|
Networks: 10.10.0.0/24
|
||||||
Peers count: 2/2 Connected
|
Peers count: 2/2 Connected
|
||||||
`, lastConnectionUpdate1, lastHandshake1, lastConnectionUpdate2, lastHandshake2, runtime.GOOS, runtime.GOARCH, overview.CliVersion)
|
`, lastConnectionUpdate1, lastHandshake1, lastConnectionUpdate2, lastHandshake2, runtime.GOOS, runtime.GOARCH, overview.CliVersion, overview.WgPort)
|
||||||
|
|
||||||
assert.Equal(t, expectedDetail, detail)
|
assert.Equal(t, expectedDetail, detail)
|
||||||
}
|
}
|
||||||
@@ -604,6 +609,7 @@ FQDN: some-localhost.awesome-domain.com
|
|||||||
NetBird IP: 192.168.178.100/16
|
NetBird IP: 192.168.178.100/16
|
||||||
NetBird IPv6: fd00::100
|
NetBird IPv6: fd00::100
|
||||||
Interface type: Kernel
|
Interface type: Kernel
|
||||||
|
Wireguard port: 51820
|
||||||
Quantum resistance: false
|
Quantum resistance: false
|
||||||
Lazy connection: false
|
Lazy connection: false
|
||||||
SSH Server: Disabled
|
SSH Server: Disabled
|
||||||
|
|||||||
Reference in New Issue
Block a user