[PR #242] [MERGED] tests: enhance integration testing for specific plugins #395

Closed
opened 2026-02-16 01:15:50 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/242
Author: @Yeuoly
Created: 4/24/2025
Status: Merged
Merged: 4/24/2025
Merged by: @Yeuoly

Base: mainHead: test/integration-test-for-plugins


📝 Commits (2)

  • 0ea7bf8 feat: enhance integration testing for specific plugins
  • 5761892 fix: update RunOnce function to return response stream and enhance integration test

📊 Changes

14 files changed (+1228 additions, -117 deletions)

View changed files

📝 .github/workflows/tests.yml (+7 -1)
📝 .gitignore (+2 -1)
integration/agent_integration_test.go (+51 -0)
integration/testdata/invoke_agent_strategy_json.json (+411 -0)
integration/testdata/langgenius-agent_0.0.14.difypkg (+0 -0)
📝 internal/core/dify_invocation/tester/mock.go (+58 -12)
internal/core/plugin_manager/lifecycle/full_duplex.go (+106 -0)
📝 internal/core/plugin_manager/local_runtime_benchmark_test.go (+2 -1)
📝 internal/core/plugin_manager/runtime_lifetime.go (+2 -102)
internal/core/plugin_manager/test_utils/openai_server.go (+151 -0)
internal/core/plugin_manager/test_utils/runtime.go (+229 -0)
internal/types/models/statistic.go (+11 -0)
internal/utils/json_schema/gen.go (+112 -0)
internal/utils/json_schema/gen_test.go (+86 -0)

📄 Description

Add Integration tests

Avoid issues like #241

  • Added integration tests for the official agent, including test data for agent strategy invocation.
  • Introduced JSON schema generation and validation utilities to ensure proper request formatting.
  • Enhanced mock invocation handling in the plugin manager to support tool parameters.
  • Added new test utilities for simulating OpenAI server responses and managing plugin runtime.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/242 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 4/24/2025 **Status:** ✅ Merged **Merged:** 4/24/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `test/integration-test-for-plugins` --- ### 📝 Commits (2) - [`0ea7bf8`](https://github.com/langgenius/dify-plugin-daemon/commit/0ea7bf8541aeaf57866c605e54492bfe01a9b280) feat: enhance integration testing for specific plugins - [`5761892`](https://github.com/langgenius/dify-plugin-daemon/commit/5761892cf951ced386912eab181f934ab9fbcb18) fix: update RunOnce function to return response stream and enhance integration test ### 📊 Changes **14 files changed** (+1228 additions, -117 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/tests.yml` (+7 -1) 📝 `.gitignore` (+2 -1) ➕ `integration/agent_integration_test.go` (+51 -0) ➕ `integration/testdata/invoke_agent_strategy_json.json` (+411 -0) ➕ `integration/testdata/langgenius-agent_0.0.14.difypkg` (+0 -0) 📝 `internal/core/dify_invocation/tester/mock.go` (+58 -12) ➕ `internal/core/plugin_manager/lifecycle/full_duplex.go` (+106 -0) 📝 `internal/core/plugin_manager/local_runtime_benchmark_test.go` (+2 -1) 📝 `internal/core/plugin_manager/runtime_lifetime.go` (+2 -102) ➕ `internal/core/plugin_manager/test_utils/openai_server.go` (+151 -0) ➕ `internal/core/plugin_manager/test_utils/runtime.go` (+229 -0) ➕ `internal/types/models/statistic.go` (+11 -0) ➕ `internal/utils/json_schema/gen.go` (+112 -0) ➕ `internal/utils/json_schema/gen_test.go` (+86 -0) </details> ### 📄 Description ## Add Integration tests Avoid issues like #241 - Added integration tests for the official agent, including test data for agent strategy invocation. - Introduced JSON schema generation and validation utilities to ensure proper request formatting. - Enhanced mock invocation handling in the plugin manager to support tool parameters. - Added new test utilities for simulating OpenAI server responses and managing plugin runtime. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:15:50 -05:00
yindo closed this issue 2026-02-16 01:15:50 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#395