Add support for ephemeral nodes via a special type of pre-auth key. Add

tests for that feature.

Other fixes: clean up a few typos in comments. Fix a bug that caused the
tests to run four times each. Be more consistent in the use of log
rather than fmt to print errors and notices.
This commit is contained in:
Ward Vandewege 2021-05-22 20:15:29 -04:00
parent 1faed2764f
commit 41f6740ddd
17 changed files with 151 additions and 38 deletions

View file

@ -4,13 +4,11 @@ import (
"gopkg.in/check.v1"
)
var _ = check.Suite(&Suite{})
func (s *Suite) TestGetMachine(c *check.C) {
n, err := h.CreateNamespace("test")
c.Assert(err, check.IsNil)
pak, err := h.CreatePreAuthKey(n.Name, false, nil)
pak, err := h.CreatePreAuthKey(n.Name, false, false, nil)
c.Assert(err, check.IsNil)
db, err := h.db()