Fix bug in preauthkeys: namespace object was not populated in the return
value from CreatePreAuthKey and GetPreAuthKeys. Add tests for that bug, and the rest of the preauthkeys functionality. Fix path in `compress` Makefile target.
This commit is contained in:
parent
68c21faf64
commit
b34e90c45d
7 changed files with 94 additions and 7 deletions
5
app.go
5
app.go
|
@ -40,6 +40,8 @@ type Config struct {
|
|||
type Headscale struct {
|
||||
cfg Config
|
||||
dbString string
|
||||
dbType string
|
||||
dbDebug bool
|
||||
publicKey *wgcfg.Key
|
||||
privateKey *wgcfg.PrivateKey
|
||||
|
||||
|
@ -59,7 +61,8 @@ func NewHeadscale(cfg Config) (*Headscale, error) {
|
|||
}
|
||||
pubKey := privKey.Public()
|
||||
h := Headscale{
|
||||
cfg: cfg,
|
||||
cfg: cfg,
|
||||
dbType: "postgres",
|
||||
dbString: fmt.Sprintf("host=%s port=%d dbname=%s user=%s password=%s sslmode=disable", cfg.DBhost,
|
||||
cfg.DBport, cfg.DBname, cfg.DBuser, cfg.DBpass),
|
||||
privateKey: privKey,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue