test: change test data to support new setup key fields

This commit is contained in:
braginini 2021-08-20 13:40:07 +02:00
parent 34cffb3bf0
commit 708835afa8
4 changed files with 19 additions and 6 deletions

View File

@ -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": {

View File

@ -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
}
}

View File

@ -26,7 +26,6 @@ import (
const (
ValidSetupKey = "A2C8E62B-38F5-4553-B31E-DD66C696CEBB"
InvalidSetupKey = "INVALID_SETUP_KEY"
)
var _ = Describe("Management service", func() {

View File

@ -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": {