mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 20:12:52 +08:00
fix: align connection diagnostics and localize announcement
This commit is contained in:
1 parent
62e41dbc51
commit
a5e5dd6592
11 files changed
+87
-27
No files matched your search
@@ -19,6 +19,7 @@ test("SQLite persistence initializes schema and stores the single admin/settings
|
||||
database.initializeAdmin(credential, {
|
||||
siteName: "Private Voice",
|
||||
welcomeText: "Welcome",
|
||||
welcomeTextEn: "",
|
||||
accessMode: "open",
|
||||
tsHost: "voice.example.com",
|
||||
tsPort: 9988,
|
||||
@@ -32,6 +33,7 @@ test("SQLite persistence initializes schema and stores the single admin/settings
|
||||
assert.deepEqual(database.getSettings(), {
|
||||
siteName: "Private Voice",
|
||||
welcomeText: "Welcome",
|
||||
welcomeTextEn: "",
|
||||
accessMode: "open",
|
||||
tsHost: "voice.example.com",
|
||||
tsPort: 9988,
|
||||
@@ -54,7 +56,7 @@ test("SQLite persistence initializes schema and stores the single admin/settings
|
||||
reopened.close();
|
||||
});
|
||||
|
||||
test("SQLite schema v1 upgrades to v3 with a migration copy", () => {
|
||||
test("SQLite schema v1 upgrades to v4 with a migration copy", () => {
|
||||
const directory = mkdtempSync(path.join(tmpdir(), "webspeak-db-migration-"));
|
||||
const dbPath = path.join(directory, "webspeak.db");
|
||||
const legacy = new DatabaseSync(dbPath);
|
||||
@@ -74,10 +76,11 @@ test("SQLite schema v1 upgrades to v3 with a migration copy", () => {
|
||||
legacy.close();
|
||||
|
||||
const upgraded = new WebSpeakDatabase(dbPath);
|
||||
assert.equal(upgraded.schemaVersion, 3);
|
||||
assert.equal(upgraded.schemaVersion, 4);
|
||||
assert.equal(upgraded.getSettings().webRtcEnabled, false);
|
||||
assert.equal(upgraded.getSettings().webRtcUdpStart, 40000);
|
||||
assert.equal(upgraded.getSettings().webRtcUdpEnd, 40099);
|
||||
assert.equal(upgraded.getSettings().welcomeTextEn, "");
|
||||
assert.equal(upgraded.listManagedInvites().length, 0);
|
||||
assert.equal(existsSync(`${dbPath}.schema-1.bak`), true);
|
||||
upgraded.close();
|
||||
|
||||
Reference in new issue
Block a user