You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/02/06 15:50:41 UTC

[GitHub] [skywalking-infra-e2e] Humbertzhang commented on a change in pull request #7: Implement the verification of the actual data file

Humbertzhang commented on a change in pull request #7:
URL: https://github.com/apache/skywalking-infra-e2e/pull/7#discussion_r571450363



##########
File path: commands/setup/setup.go
##########
@@ -21,19 +21,30 @@ package setup
 import (
 	"fmt"
 
+	"github.com/apache/skywalking-infra-e2e/internal/components/setup"
 	"github.com/apache/skywalking-infra-e2e/internal/config"
-
 	"github.com/apache/skywalking-infra-e2e/internal/constant"
+	"github.com/apache/skywalking-infra-e2e/internal/logger"
+	"github.com/apache/skywalking-infra-e2e/internal/util"
 
 	"github.com/spf13/cobra"
-
-	"github.com/apache/skywalking-infra-e2e/internal/components/setup"
-	"github.com/apache/skywalking-infra-e2e/internal/logger"
 )
 
 var Setup = &cobra.Command{
 	Use:   "setup",
 	Short: "",
+	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
+		err := util.CheckDockerDaemon()
+		if err != nil {
+			return err
+		}
+
+		err = config.ReadGlobalConfigFile(constant.E2EDefaultFile)

Review comment:
       The `config.ReadGlobalConfigFile(constant.E2EDefaultFile)` should in root command? Because other command such as `e2e cleanup` `e2e run` `e2e verify` ...  may also need to read the `e2e.yaml`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org