From aec90f69972470dff57717061e98c9a1f0d9628e Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 27 Apr 2020 14:34:28 -0700 Subject: [PATCH] fix: correct the default-datastore config profile And use an actual profile instead of just aliasing. --- profile.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/profile.go b/profile.go index a95ba0f..697ca30 100644 --- a/profile.go +++ b/profile.go @@ -110,6 +110,20 @@ Inverse profile of the test profile.`, return nil }, }, + "default-datastore": { + Description: `Configures the node to use the default datastore (flatfs). + +Read the "flatfs" profile description for more information on this datastore. + +This profile may only be applied when first initializing the node. +`, + + InitOnly: true, + Transform: func(c *Config) error { + c.Datastore.Spec = flatfsSpec() + return nil + }, + }, "flatfs": { Description: `Configures the node to use the flatfs datastore. @@ -189,10 +203,6 @@ fetching may be degraded. }, } -func init() { - Profiles["default-datatore"] = Profiles["badgerds"] -} - func getAvailablePort() (port int, err error) { ln, err := net.Listen("tcp", "[::]:0") if err != nil {