Humbertzhang commented on a change in pull request #3:
URL: https://github.com/apache/skywalking-infra-e2e/pull/3#discussion_r564288130
##########
File path: commands/setup/setup.go
##########
@@ -49,9 +56,42 @@ var Setup = &cobra.Command{
if err := setup.KindSetupInCommand(); err != nil {
return err
}
+ } else if flags.Env == "" {
+ // setup according e2e.yaml
+ err := setupAccordingE2E()
+ if err != nil {
+ return err
+ }
} else {
return fmt.Errorf("no such env for setup: [%s]. should
use kind or compose instead", flags.Env)
}
return nil
},
}
+
+func setupAccordingE2E() error {
+ // setup according e2e.yaml
+ e2eFile := constant.E2EDefaultFile
+ logger.Log.Infof("reading e2e config file:%s", e2eFile)
+ data, err := ioutil.ReadFile(e2eFile)
+ if err != nil {
+ return err
+ }
+
+ e2eConfig := config.E2EConfig{}
+ err = yaml.Unmarshal(data, &e2eConfig)
+ if err != nil {
+ return err
+ }
+
Review comment:
I have a question about it, if i use e2e command in folder1 with
e2e.yaml, then i use e2e command in folder2 with another e2e.yaml, how could it
switch to the next 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:
[email protected]