Skip to content

Commit

Permalink
fix(cloudevents): fix UT cases
Browse files Browse the repository at this point in the history
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
  • Loading branch information
wuhuizuo committed Dec 26, 2023
1 parent d0148db commit e1b2391
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func Test_pipelineRunHandler_Handle(t *testing.T) {

h := &pipelineRunHandler{
LarkClient: lark.NewClient(larkAppID, larkAppSecret, lark.WithLogReqAtDebug(true), lark.WithEnableTokenCache(true)),
Receiver: receiver,
RunDetailBaseURL: baseURL,
}
for _, tt := range tests {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func Test_taskRunHandler_Handle(t *testing.T) {

h := &taskRunHandler{
LarkClient: lark.NewClient(larkAppID, larkAppSecret, lark.WithLogReqAtDebug(true), lark.WithEnableTokenCache(true)),
Receiver: receiver,
RunDetailBaseURL: baseURL,
}
for _, tt := range tests {
Expand Down
12 changes: 7 additions & 5 deletions cloudevents-server/pkg/events/custom/tekton/handler_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package tekton

const (
larkAppID = "<Chagne me>"
larkAppSecret = "<Chagne me>"
receiver = "<Change me>@xxx.com"
baseURL = "https://chagne.me.com/"
import "os"

var (
larkAppID = os.Getenv("LARK_APP_ID")
larkAppSecret = os.Getenv("LARK_APP_SECRET")
receiver = os.Getenv("LARK_RECEIVER")
baseURL = os.Getenv("LINK_BASE_URL")
)

0 comments on commit e1b2391

Please sign in to comment.