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/10/11 04:13:50 UTC

[GitHub] [skywalking-infra-e2e] mrproliu opened a new pull request #53: Support reuse `verify.cases`

mrproliu opened a new pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53


   Resolve https://github.com/apache/skywalking/issues/7896


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725825726



##########
File path: commands/verify/verify.go
##########
@@ -101,7 +101,29 @@ func DoVerifyAccordingConfig() error {
 		return err
 	}
 
-	for idx, v := range e2eConfig.Verify.Cases {
+	if err := verifyCases(retryCount, interval, e2eConfig.Verify.Cases); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func verifyCases(retryCount int, interval time.Duration, cases []config.VerifyCase) error {
+	for idx, v := range cases {
+		if len(v.Include) > 0 {
+			for _, include := range v.Include {
+				reusingCases, err := config.ReadReusingCases(include)

Review comment:
       I think `include` is just a convenient way of `query / expected` so we can populate the `cases` list via reading the included files. It's static isn't it ?




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r726073925



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -114,6 +114,8 @@ verify:
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases
+        - path/to/cases.yaml            # cases file path

Review comment:
       Using `list` could also implement this one future. The same item of the case shares the option configuration, if want's different option configuration, just need to create another case item below `verify.cases`.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r726170139



##########
File path: internal/config/globalConfig.go
##########
@@ -63,6 +63,59 @@ func ReadGlobalConfigFile() {
 		return
 	}
 
+	// convert verify
+	if err := convertVerify(&GlobalConfig.E2EConfig.Verify); err != nil {
+		GlobalConfig.Error = err
+		return
+	}
+
 	GlobalConfig.Error = nil
 	logger.Log.Info("load the e2e config successfully")
 }
+
+func convertVerify(verify *Verify) error {
+	// convert cases
+	result := make([]VerifyCase, 0)
+	for _, c := range verify.Cases {
+		cases, err := convertSingleCase(c)
+		if err != nil {
+			return err
+		}
+		result = append(result, cases...)
+	}
+	verify.Cases = result
+	return nil
+}
+
+func convertSingleCase(verifyCase VerifyCase) ([]VerifyCase, error) {
+	if len(verifyCase.Include) > 0 {
+		result := make([]VerifyCase, 0)
+		for _, include := range verifyCase.Include {
+			includePath := util.ResolveAbs(include)

Review comment:
       Add `UT` for `util.ResolveAbs`




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725820807



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -114,6 +114,8 @@ verify:
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases
+        - path/to/cases.yaml            # cases file path

Review comment:
       Ok, I understand. 




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725795907



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -114,6 +114,8 @@ verify:
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases
+        - path/to/cases.yaml            # cases file path

Review comment:
       Could you do more explain what kind of options? Or should we need to add the option into the reuse cases files?




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725781510



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -177,6 +179,20 @@ In order to make the program easier for users to read and use, some code convers
 |-------|------------|-------|------|
 |b64enc|Base64 encode|{{ b64enc "Foo" }}|Zm9v|
 
+### Include cases

Review comment:
       ```suggestion
   ### Reuse cases
   ```

##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -177,6 +179,20 @@ In order to make the program easier for users to read and use, some code convers
 |-------|------------|-------|------|
 |b64enc|Base64 encode|{{ b64enc "Foo" }}|Zm9v|
 
+### Include cases
+
+Could be including multiple cases into one single E2E verify, It's help for reusing the same verify cases.
+
+Here is the reusing verify cases, and using `include` configuration item to include this into E2E config.

Review comment:
       ```suggestion
   Here is the reused verify cases, and using `include` configuration item to include this into E2E config.
   ```

##########
File path: commands/verify/verify.go
##########
@@ -101,7 +101,29 @@ func DoVerifyAccordingConfig() error {
 		return err
 	}
 
-	for idx, v := range e2eConfig.Verify.Cases {
+	if err := verifyCases(retryCount, interval, e2eConfig.Verify.Cases); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func verifyCases(retryCount int, interval time.Duration, cases []config.VerifyCase) error {
+	for idx, v := range cases {
+		if len(v.Include) > 0 {
+			for _, include := range v.Include {
+				reusingCases, err := config.ReadReusingCases(include)

Review comment:
       I'd rather parsing the `include` when parsing the global config (`ReadGlobalConfigFile`), and convert the `include` to the standard `verify.cases`

##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -114,6 +114,8 @@ verify:
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases
+        - path/to/cases.yaml            # cases file path

Review comment:
       What I proposed is
   
   ```yaml
   - include: path/to/cases1.yaml
   - include: path/to/cases2.yaml
   ```
   
   The reasons is that we have changes to add more options to the `include` item without breaking compatibility.
   
   
   ```yaml
   - include: path/to/cases1.yaml
     option1: xxx
     option2: yyy
   - include: path/to/cases2.yaml
     option1: xxx
     option2: yyy
   ```
   

##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -177,6 +179,20 @@ In order to make the program easier for users to read and use, some code convers
 |-------|------------|-------|------|
 |b64enc|Base64 encode|{{ b64enc "Foo" }}|Zm9v|
 
+### Include cases
+
+Could be including multiple cases into one single E2E verify, It's help for reusing the same verify cases.

Review comment:
       ```suggestion
   You could include multiple cases into one single E2E verify, It's helpful for reusing the same verify cases.
   ```




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 merged pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 merged pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725823924



##########
File path: commands/verify/verify.go
##########
@@ -101,7 +101,29 @@ func DoVerifyAccordingConfig() error {
 		return err
 	}
 
-	for idx, v := range e2eConfig.Verify.Cases {
+	if err := verifyCases(retryCount, interval, e2eConfig.Verify.Cases); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func verifyCases(retryCount int, interval time.Duration, cases []config.VerifyCase) error {
+	for idx, v := range cases {
+		if len(v.Include) > 0 {
+			for _, include := range v.Include {
+				reusingCases, err := config.ReadReusingCases(include)

Review comment:
       Use the way you commented, I think we should create another struct for getting the config at runtime, such as called `runtimeConfig`. Because it's different between user config and system runtime config. WDYT?




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725780195



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -114,6 +114,8 @@ verify:
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases
+        - path/to/cases.yaml            # cases file path

Review comment:
       What I proposed is
   
   ```yaml
   - include: path/to/cases1.yaml
   - include: path/to/cases2.yaml
   ```
   
   The reasons is that we have chances to add more options to the `include` item without breaking compatibility.
   
   
   ```yaml
   - include: path/to/cases1.yaml
     option1: xxx
     option2: yyy
   - include: path/to/cases2.yaml
     option1: xxx
     option2: yyy
   ```
   




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725813203



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -114,6 +114,8 @@ verify:
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases
+        - path/to/cases.yaml            # cases file path

Review comment:
       What I can think of for now is to pass some variables to the included files, for example, we might pass the service name into the included files




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725829981



##########
File path: commands/verify/verify.go
##########
@@ -101,7 +101,29 @@ func DoVerifyAccordingConfig() error {
 		return err
 	}
 
-	for idx, v := range e2eConfig.Verify.Cases {
+	if err := verifyCases(retryCount, interval, e2eConfig.Verify.Cases); err != nil {
+		return err
+	}
+
+	return nil
+}
+
+func verifyCases(retryCount int, interval time.Duration, cases []config.VerifyCase) error {
+	for idx, v := range cases {
+		if len(v.Include) > 0 {
+			for _, include := range v.Include {
+				reusingCases, err := config.ReadReusingCases(include)

Review comment:
       Ok, I just worried that the user config is more and more complex. Using another runtime config helps E2E processing the verify stage.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] fgksgf commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
fgksgf commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r726094512



##########
File path: examples/kind/e2e.yaml
##########
@@ -60,8 +60,8 @@ verify:
   retry:
     # max retry count
     count: 10
-    # the interval between two retries, in millisecond.
-    interval: 10000
+    # the duration between two attempts, e.g. 10s, 1m.

Review comment:
       Ditto.

##########
File path: examples/compose/e2e.yaml
##########
@@ -49,8 +49,8 @@ verify:
   retry:
     # max retry count
     count: 10
-    # the interval between two retries, in millisecond.
-    interval: 10000
+    # the duration between two attempts, e.g. 10s, 1m.
+    interval: 10s

Review comment:
       I think it is more appropriate to use `interval` in the comment.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r726116456



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -108,12 +108,14 @@ After the `Trigger` step is finished, running test cases.
 verify:
   retry:            # verify with retry strategy
     count: 10       # max retry count
-    interval: 10s   # the duration between two attempts, e.g. 10s, 1m.
+    interval: 10s   # the interval between two attempts, e.g. 10s, 1m.
   cases:            # verify test cases
     - actual: path/to/actual.yaml       # verify by actual file path
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases

Review comment:
       As this is a list, let's use `includes`




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r725780195



##########
File path: docs/en/setup/Configuration-File.md
##########
@@ -114,6 +114,8 @@ verify:
       expected: path/to/expected.yaml   # excepted content file path
     - query: echo 'foo'                 # verify by command execute output
       expected: path/to/expected.yaml   # excepted content file path
+    - include:      # including cases
+        - path/to/cases.yaml            # cases file path

Review comment:
       What I proposed is
   
   ```yaml
   - include: path/to/cases1.yaml
   - include: path/to/cases2.yaml
   ```
   
   The reasons is that we have chances to add more options to the `include` item without breaking compatibility in the future.
   
   
   ```yaml
   - include: path/to/cases1.yaml
     option1: xxx
     option2: yyy
   - include: path/to/cases2.yaml
     option1: xxx
     option2: yyy
   ```
   




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r726107847



##########
File path: examples/compose/e2e.yaml
##########
@@ -49,8 +49,8 @@ verify:
   retry:
     # max retry count
     count: 10
-    # the interval between two retries, in millisecond.
-    interval: 10000
+    # the duration between two attempts, e.g. 10s, 1m.
+    interval: 10s

Review comment:
       make sense, thank you.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] mrproliu commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
mrproliu commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r726168132



##########
File path: internal/config/globalConfig.go
##########
@@ -63,6 +63,59 @@ func ReadGlobalConfigFile() {
 		return
 	}
 
+	// convert verify
+	if err := convertVerify(&GlobalConfig.E2EConfig.Verify); err != nil {
+		GlobalConfig.Error = err
+		return
+	}
+
 	GlobalConfig.Error = nil
 	logger.Log.Info("load the e2e config successfully")
 }
+
+func convertVerify(verify *Verify) error {
+	// convert cases
+	result := make([]VerifyCase, 0)
+	for _, c := range verify.Cases {
+		cases, err := convertSingleCase(c)
+		if err != nil {
+			return err
+		}
+		result = append(result, cases...)
+	}
+	verify.Cases = result
+	return nil
+}
+
+func convertSingleCase(verifyCase VerifyCase) ([]VerifyCase, error) {
+	if len(verifyCase.Include) > 0 {

Review comment:
       Added.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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



[GitHub] [skywalking-infra-e2e] kezhenxu94 commented on a change in pull request #53: Support reuse `verify.cases`

Posted by GitBox <gi...@apache.org>.
kezhenxu94 commented on a change in pull request #53:
URL: https://github.com/apache/skywalking-infra-e2e/pull/53#discussion_r726120687



##########
File path: internal/config/globalConfig.go
##########
@@ -63,6 +63,59 @@ func ReadGlobalConfigFile() {
 		return
 	}
 
+	// convert verify
+	if err := convertVerify(&GlobalConfig.E2EConfig.Verify); err != nil {
+		GlobalConfig.Error = err
+		return
+	}
+
 	GlobalConfig.Error = nil
 	logger.Log.Info("load the e2e config successfully")
 }
+
+func convertVerify(verify *Verify) error {
+	// convert cases
+	result := make([]VerifyCase, 0)
+	for _, c := range verify.Cases {
+		cases, err := convertSingleCase(c)
+		if err != nil {
+			return err
+		}
+		result = append(result, cases...)
+	}
+	verify.Cases = result
+	return nil
+}
+
+func convertSingleCase(verifyCase VerifyCase) ([]VerifyCase, error) {
+	if len(verifyCase.Include) > 0 {

Review comment:
       Let's also check whether both `includes` and `query / expected` are specified, if so, we should give an error, otherwise the `query / expected` will be ignored silently 

##########
File path: internal/config/globalConfig.go
##########
@@ -63,6 +63,59 @@ func ReadGlobalConfigFile() {
 		return
 	}
 
+	// convert verify
+	if err := convertVerify(&GlobalConfig.E2EConfig.Verify); err != nil {
+		GlobalConfig.Error = err
+		return
+	}
+
 	GlobalConfig.Error = nil
 	logger.Log.Info("load the e2e config successfully")
 }
+
+func convertVerify(verify *Verify) error {
+	// convert cases
+	result := make([]VerifyCase, 0)
+	for _, c := range verify.Cases {
+		cases, err := convertSingleCase(c)
+		if err != nil {
+			return err
+		}
+		result = append(result, cases...)
+	}
+	verify.Cases = result
+	return nil
+}
+
+func convertSingleCase(verifyCase VerifyCase) ([]VerifyCase, error) {
+	if len(verifyCase.Include) > 0 {
+		result := make([]VerifyCase, 0)
+		for _, include := range verifyCase.Include {
+			includePath := util.ResolveAbs(include)

Review comment:
       Can you also add some unit tests to verify the paths are resolved correctly? Since the `includes` are mostly relative paths, they should be relative to the file where they locate.

##########
File path: internal/config/globalConfig.go
##########
@@ -63,6 +63,59 @@ func ReadGlobalConfigFile() {
 		return
 	}
 
+	// convert verify
+	if err := convertVerify(&GlobalConfig.E2EConfig.Verify); err != nil {
+		GlobalConfig.Error = err
+		return
+	}
+
 	GlobalConfig.Error = nil
 	logger.Log.Info("load the e2e config successfully")
 }
+
+func convertVerify(verify *Verify) error {
+	// convert cases
+	result := make([]VerifyCase, 0)
+	for _, c := range verify.Cases {
+		cases, err := convertSingleCase(c)
+		if err != nil {
+			return err
+		}
+		result = append(result, cases...)
+	}
+	verify.Cases = result
+	return nil
+}
+
+func convertSingleCase(verifyCase VerifyCase) ([]VerifyCase, error) {
+	if len(verifyCase.Include) > 0 {
+		result := make([]VerifyCase, 0)
+		for _, include := range verifyCase.Include {
+			includePath := util.ResolveAbs(include)
+
+			if !util.PathExist(includePath) {
+				return nil, fmt.Errorf("reuse case config file %s not exist", includePath)
+			}
+
+			data, err := ioutil.ReadFile(includePath)
+			if err != nil {
+				return nil, fmt.Errorf("reuse case config file %s error: %s", includePath, err)
+			}
+
+			r := &ReusingCases{}
+			if err := yaml.Unmarshal(data, r); err != nil {
+				return nil, fmt.Errorf("unmarshal reuse case config file %s error: %s", includePath, err)
+			}
+
+			for _, c := range r.Cases {
+				cases, err := convertSingleCase(c)
+				if err != nil {
+					return nil, err
+				}
+				result = append(result, cases...)
+			}
+		}
+		return result, nil
+	}
+	return []VerifyCase{verifyCase}, nil

Review comment:
       ```suggestion
   	if len(verifyCase.Include) == 0 {
   		return []VerifyCase{verifyCase}, nil
   	}
   	result := make([]VerifyCase, 0)
   	for _, include := range verifyCase.Include {
   		includePath := util.ResolveAbs(include)
   
   		if !util.PathExist(includePath) {
   			return nil, fmt.Errorf("reuse case config file %s not exist", includePath)
   		}
   
   		data, err := ioutil.ReadFile(includePath)
   		if err != nil {
   			return nil, fmt.Errorf("reuse case config file %s error: %s", includePath, err)
   		}
   
   		r := &ReusingCases{}
   		if err := yaml.Unmarshal(data, r); err != nil {
   			return nil, fmt.Errorf("unmarshal reuse case config file %s error: %s", includePath, err)
   		}
   
   		for _, c := range r.Cases {
   			cases, err := convertSingleCase(c)
   			if err != nil {
   				return nil, err
   			}
   			result = append(result, cases...)
   		}
   	}
   	return result, nil
   ```




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

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