Updates from review of 2076 (#2135)
This commit is contained in:
1 parent
631c174f47
commit
f4642930b4
3 files changed
+4
-11
No files matched your search
@@ -196,8 +196,8 @@ type Worker struct {
|
||||
// TODO: This field is currently internal.
|
||||
StatusGracePeriodDuration time.Duration `hcl:"-"`
|
||||
|
||||
// StoragePath represents the location a pki worker stores its node credentials, if set.
|
||||
AuthStoragePath string `hcl:"storage_path"`
|
||||
// AuthStoragePath represents the location a worker stores its node credentials, if set
|
||||
AuthStoragePath string `hcl:"auth_storage_path"`
|
||||
}
|
||||
|
||||
func (w *Worker) InitNameIfEmpty() (string, error) {
|
||||
|
||||
@@ -423,7 +423,7 @@ func TestDevWorkerCredentialStorageDir(t *testing.T) {
|
||||
tags {
|
||||
type = ["dev", "local"]
|
||||
}
|
||||
storage_path = ".."
|
||||
auth_storage_path = ".."
|
||||
}
|
||||
`,
|
||||
storagePath: "..",
|
||||
@@ -442,7 +442,7 @@ func TestDevWorkerCredentialStorageDir(t *testing.T) {
|
||||
tags {
|
||||
type = ["dev", "local"]
|
||||
}
|
||||
storage_path = "nonexistent_dir/here"
|
||||
auth_storage_path = "nonexistent_dir/here"
|
||||
}
|
||||
`,
|
||||
storagePath: "nonexistent_dir/here",
|
||||
|
||||
@@ -184,13 +184,6 @@ func (w *Worker) Start() error {
|
||||
controllerResolver := manual.NewBuilderWithScheme(scheme)
|
||||
w.controllerResolver.Store(controllerResolver)
|
||||
|
||||
var err error
|
||||
w.NodeeFileStorage, err = nodeefile.NewFileStorage(w.baseContext,
|
||||
nodeefile.WithBaseDirectory(w.conf.RawConfig.Worker.AuthStoragePath))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := w.startListeners(); err != nil {
|
||||
return fmt.Errorf("error starting worker listeners: %w", err)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user