mirror of
https://github.com/netbirdio/netbird.git
synced 2024-11-22 08:03:30 +01:00
test: change test data to support new setup key fields
This commit is contained in:
parent
34cffb3bf0
commit
708835afa8
10
client/testdata/store.json
vendored
10
client/testdata/store.json
vendored
@ -3,8 +3,14 @@
|
||||
"bf1c8084-ba50-4ce7-9439-34653001fc3b": {
|
||||
"Id": "bf1c8084-ba50-4ce7-9439-34653001fc3b",
|
||||
"SetupKeys": {
|
||||
"a2c8e62b-38f5-4553-b31e-dd66c696cebb": {
|
||||
"Key": "a2c8e62b-38f5-4553-b31e-dd66c696cebb"
|
||||
"A2C8E62B-38F5-4553-B31E-DD66C696CEBB": {
|
||||
"Key": "A2C8E62B-38F5-4553-B31E-DD66C696CEBB",
|
||||
"Name": "Default key",
|
||||
"Type": "reusable",
|
||||
"CreatedAt": "2021-08-19T20:46:20.005936822+02:00",
|
||||
"ExpiresAt": "2321-09-18T20:46:20.005936822+02:00",
|
||||
"Revoked": false,
|
||||
"UsedTimes": 0
|
||||
}
|
||||
},
|
||||
"Network": {
|
||||
|
@ -180,6 +180,7 @@ func (manager *AccountManager) AddPeer(setupKey string, peerKey string) (*Peer,
|
||||
for _, key := range account.SetupKeys {
|
||||
if upperKey == key.Key {
|
||||
sk = key
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,7 +26,6 @@ import (
|
||||
|
||||
const (
|
||||
ValidSetupKey = "A2C8E62B-38F5-4553-B31E-DD66C696CEBB"
|
||||
InvalidSetupKey = "INVALID_SETUP_KEY"
|
||||
)
|
||||
|
||||
var _ = Describe("Management service", func() {
|
||||
|
11
management/server/testdata/store.json
vendored
11
management/server/testdata/store.json
vendored
@ -3,8 +3,15 @@
|
||||
"bf1c8084-ba50-4ce7-9439-34653001fc3b": {
|
||||
"Id": "bf1c8084-ba50-4ce7-9439-34653001fc3b",
|
||||
"SetupKeys": {
|
||||
"a2c8e62b-38f5-4553-b31e-dd66c696cebb": {
|
||||
"Key": "a2c8e62b-38f5-4553-b31e-dd66c696cebb"
|
||||
"A2C8E62B-38F5-4553-B31E-DD66C696CEBB": {
|
||||
"Key": "A2C8E62B-38F5-4553-B31E-DD66C696CEBB",
|
||||
"Name": "Default key",
|
||||
"Type": "reusable",
|
||||
"CreatedAt": "2021-08-19T20:46:20.005936822+02:00",
|
||||
"ExpiresAt": "2321-09-18T20:46:20.005936822+02:00",
|
||||
"Revoked": false,
|
||||
"UsedTimes": 0
|
||||
|
||||
}
|
||||
},
|
||||
"Network": {
|
||||
|
Loading…
Reference in New Issue
Block a user