You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2021/10/14 03:52:21 UTC
[skywalking-infra-e2e] branch main updated: ignore trigger when not
set (#55)
This is an automated email from the ASF dual-hosted git repository.
liuhan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-infra-e2e.git
The following commit(s) were added to refs/heads/main by this push:
new ec1f19c ignore trigger when not set (#55)
ec1f19c is described below
commit ec1f19ca37fb7a8e8ef7d669b28338451560763b
Author: mrproliu <74...@qq.com>
AuthorDate: Thu Oct 14 11:52:16 2021 +0800
ignore trigger when not set (#55)
---
commands/run/run.go | 12 ++++++++----
commands/trigger/trigger.go | 5 +++++
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/commands/run/run.go b/commands/run/run.go
index c7566e6..259cab8 100644
--- a/commands/run/run.go
+++ b/commands/run/run.go
@@ -86,11 +86,15 @@ func runAccordingE2E() error {
if err != nil {
return err
}
- err = <-action.Do()
- if err != nil {
- return err
+ if action != nil {
+ err = <-action.Do()
+ if err != nil {
+ return err
+ }
+ logger.Log.Infof("trigger part finished successfully")
+ } else {
+ logger.Log.Infof("no trigger need to execute")
}
- logger.Log.Infof("trigger part finished successfully")
// verify part
err = verify.DoVerifyAccordingConfig()
diff --git a/commands/trigger/trigger.go b/commands/trigger/trigger.go
index 8b546c0..fd1a006 100644
--- a/commands/trigger/trigger.go
+++ b/commands/trigger/trigger.go
@@ -35,6 +35,9 @@ var Trigger = &cobra.Command{
if err != nil {
return fmt.Errorf("[Trigger] %v", err)
}
+ if action == nil {
+ return nil
+ }
return <-action.Do()
},
}
@@ -45,6 +48,8 @@ func CreateTriggerAction() (trigger.Action, error) {
}
switch t := config.GlobalConfig.E2EConfig.Trigger; t.Action {
+ case "":
+ return nil, nil
case constant.ActionHTTP:
return trigger.NewHTTPAction(
t.Interval,