<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.
28 lines
475 B
Go
28 lines
475 B
Go
package feishu
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
var (
|
|
testAppID string
|
|
testAppSecret string
|
|
)
|
|
|
|
func TestMain(m *testing.M) {
|
|
testAppID = os.Getenv("FEISHU_TEST_APP_ID")
|
|
testAppSecret = os.Getenv("FEISHU_TEST_APP_SECRET")
|
|
os.Exit(m.Run())
|
|
}
|
|
|
|
func skipIfNoCreds(t *testing.T) {
|
|
t.Helper()
|
|
if testAppID == "" || testAppSecret == "" {
|
|
t.Skip("FEISHU_TEST_APP_ID or FEISHU_TEST_APP_SECRET not set")
|
|
}
|
|
}
|
|
|
|
func testBot() *Bot {
|
|
return NewBot(testAppID, testAppSecret)
|
|
}
|