yao/integrations/dingtalk/dingtalk_test.go
Max 33efd3e890 Add Feishu and DingTalk integration support in robot lifecycle</message>
<message>
- Introduce Feishu and DingTalk adapters in the robot lifecycle for enhanced integration capabilities.
- Update the integration dispatcher to include new adapters for handling events from Feishu and DingTalk.
- Modify the configuration structure to support settings for both Feishu and DingTalk integrations.
- Enhance the integration parsing logic to recognize and process configurations for Feishu and DingTalk.
2026-03-02 07:36:34 +08:00

28 lines
529 B
Go

package dingtalk
import (
"os"
"testing"
)
var (
testClientID string
testClientSecret string
)
func TestMain(m *testing.M) {
testClientID = os.Getenv("DINGTALK_TEST_CLIENT_ID")
testClientSecret = os.Getenv("DINGTALK_TEST_CLIENT_SECRET")
os.Exit(m.Run())
}
func skipIfNoCreds(t *testing.T) {
t.Helper()
if testClientID == "" || testClientSecret == "" {
t.Skip("DINGTALK_TEST_CLIENT_ID or DINGTALK_TEST_CLIENT_SECRET not set")
}
}
func testBotInstance() *Bot {
return NewBot(testClientID, testClientSecret)
}