diff --git a/client/testdata/store.json b/client/testdata/store.json index a63c18727..aed56de20 100644 --- a/client/testdata/store.json +++ b/client/testdata/store.json @@ -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": { diff --git a/management/server/account.go b/management/server/account.go index c6484be93..f3f4ac143 100644 --- a/management/server/account.go +++ b/management/server/account.go @@ -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 } } diff --git a/management/server/management_test.go b/management/server/management_test.go index ad5cb135f..63e17720f 100644 --- a/management/server/management_test.go +++ b/management/server/management_test.go @@ -25,8 +25,7 @@ import ( ) const ( - ValidSetupKey = "A2C8E62B-38F5-4553-B31E-DD66C696CEBB" - InvalidSetupKey = "INVALID_SETUP_KEY" + ValidSetupKey = "A2C8E62B-38F5-4553-B31E-DD66C696CEBB" ) var _ = Describe("Management service", func() { diff --git a/management/server/testdata/store.json b/management/server/testdata/store.json index a63c18727..c567aaf4b 100644 --- a/management/server/testdata/store.json +++ b/management/server/testdata/store.json @@ -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": {