Skip to content

Commit

Permalink
bootstrap: test: add mutliple wg test
Browse files Browse the repository at this point in the history
Signed-off-by: Date Huang <[email protected]>
  • Loading branch information
tjjh89017 committed Sep 30, 2024
1 parent 0c38069 commit 7824452
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions internal/ctrl/bootstrap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,23 @@ func TestBootstrap_WithMultipleInterfaces(t *testing.T) {
logger := zerolog.Nop()
config := &config.Config{
Interfaces: map[string]config.Interface{
"wg0": {},
"wg1": {},
"wg0": config.Interface{
Peers: map[string]config.Peer{
"test_peer1": config.Peer{
PublicKey: "XgPRso34lnrSAx8nJtdj1/zlF7CoNj7B64LPElYdOGs=",
},
},
},
"wg1": config.Interface{
Peers: map[string]config.Peer{
"test_peer2": config.Peer{
PublicKey: "FQ9/2l8t4xmQQbs6SB03+Lh2VijJX74rxRUOv7YT03k=",
},
"test_peer3": config.Peer{
PublicKey: "Cud5HogJJLCppoUuHnWrSvEJuI49D01sQcfiD3Y9RRU=",
},
},
},
},
}

Expand All @@ -97,7 +112,7 @@ func TestBootstrap_WithMultipleInterfaces(t *testing.T) {
PrivateKey: [32]byte{},
Peers: []wgtypes.Peer{
{
PublicKey: [32]byte{},
PublicKey: [32]byte{94, 3, 209, 178, 141, 248, 150, 122, 210, 3, 31, 39, 38, 215, 99, 215, 252, 229, 23, 176, 168, 54, 62, 193, 235, 130, 207, 18, 86, 29, 56, 107},
},
},
}
Expand All @@ -108,10 +123,10 @@ func TestBootstrap_WithMultipleInterfaces(t *testing.T) {
PrivateKey: [32]byte{},
Peers: []wgtypes.Peer{
{
PublicKey: [32]byte{},
PublicKey: [32]byte{21, 15, 127, 218, 95, 45, 227, 25, 144, 65, 187, 58, 72, 29, 55, 248, 184, 118, 86, 40, 201, 95, 190, 43, 197, 21, 14, 191, 182, 19, 211, 121},
},
{
PublicKey: [32]byte{},
PublicKey: [32]byte{10, 231, 121, 30, 136, 9, 36, 176, 169, 166, 133, 46, 30, 117, 171, 74, 241, 9, 184, 142, 61, 15, 77, 108, 65, 199, 226, 15, 118, 61, 69, 21},
},
},
}
Expand Down

0 comments on commit 7824452

Please sign in to comment.