+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/api/test/model/ScenarioModel.js b/frontend/src/business/components/api/test/model/ScenarioModel.js
index 3ab228bf13..d632da62d5 100644
--- a/frontend/src/business/components/api/test/model/ScenarioModel.js
+++ b/frontend/src/business/components/api/test/model/ScenarioModel.js
@@ -211,14 +211,16 @@ export class Scenario extends BaseConfig {
this.environment = undefined;
this.enableCookieShare = false;
this.enable = true;
+ this.databaseConfigs = undefined;
this.set(options);
- this.sets({variables: KeyValue, headers: KeyValue, requests: RequestFactory}, options);
+ this.sets({variables: KeyValue, headers: KeyValue, requests: RequestFactory, databaseConfigs: DatabaseConfig}, options);
}
initOptions(options = {}) {
options.id = options.id || uuid();
options.requests = options.requests || [new RequestFactory()];
+ options.databaseConfigs = options.databaseConfigs || [];
options.dubboConfig = new DubboConfig(options.dubboConfig);
return options;
}
@@ -479,6 +481,51 @@ export class ConfigCenter extends BaseConfig {
}
}
+export class DatabaseConfig extends BaseConfig {
+ static DRIVER_CLASS = ["com.mysql.jdbc.Driver"];
+
+ constructor(options) {
+ super();
+ this.id = undefined;
+ this.name = undefined;
+ this.poolMax = undefined;
+ this.timeout = undefined;
+ this.driver = undefined;
+ this.dbUrl = undefined;
+ this.username = undefined;
+ this.password = undefined;
+
+ this.set(options);
+ }
+
+ initOptions(options = {}) {
+ // options.id = options.id || uuid();
+ return options;
+ }
+//