Make "authKey" a constant

This commit is contained in:
Kristoffer Dalby 2021-11-18 08:49:55 +00:00
parent 35c3fe9608
commit a8a8f01429
9 changed files with 36 additions and 33 deletions

View file

@ -36,7 +36,7 @@ func (s *Suite) TestGetUsedIps(c *check.C) {
Name: "testmachine",
NamespaceID: namespace.ID,
Registered: true,
RegisterMethod: "authKey",
RegisterMethod: RegisterMethodAuthKey,
AuthKeyID: uint(pak.ID),
IPAddress: ip.String(),
}
@ -78,7 +78,7 @@ func (s *Suite) TestGetMultiIp(c *check.C) {
Name: "testmachine",
NamespaceID: namespace.ID,
Registered: true,
RegisterMethod: "authKey",
RegisterMethod: RegisterMethodAuthKey,
AuthKeyID: uint(pak.ID),
IPAddress: ip.String(),
}
@ -151,7 +151,7 @@ func (s *Suite) TestGetAvailableIpMachineWithoutIP(c *check.C) {
Name: "testmachine",
NamespaceID: namespace.ID,
Registered: true,
RegisterMethod: "authKey",
RegisterMethod: RegisterMethodAuthKey,
AuthKeyID: uint(pak.ID),
}
app.db.Save(&machine)