You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "warren830 (via GitHub)" <gi...@apache.org> on 2023/03/14 09:58:55 UTC

[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #4659: refactor(framework): use generic to optimize

warren830 commented on code in PR #4659:
URL: https://github.com/apache/incubator-devlake/pull/4659#discussion_r1135287613


##########
backend/helpers/pluginhelper/api/scope_helper_test.go:
##########
@@ -102,19 +100,40 @@ func TestCheckPrimaryKeyValue(t *testing.T) {
 				ID:   1,
 				Name: "",
 			},
-			wantErr: true,
+			wantErr: false,
 		},
 	}
 
 	for _, tc := range testCases {
-		err := VerifyPrimaryKeyValue(tc.model)
+		err := VerifyScope(tc.model, validator.New())
 		if (err != nil) != tc.wantErr {
 			t.Errorf("unexpected error value - got: %v, want: %v", err, tc.wantErr)
 		}
 
 	}
 }
 
+type GithubTransformationRule struct {

Review Comment:
   Because here we cannot import plugin's GithubTransformationRule, so we have to define one here for test



-- 
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: commits-unsubscribe@devlake.apache.org

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