mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-17 03:35:51 +03:00
Prepare dockerfile for use, allow configuring via env vars
This commit is contained in:
@@ -89,7 +89,7 @@ describe("getStatus", () => {
|
||||
});
|
||||
|
||||
it("Should be able to get statusRequests only", function (done) {
|
||||
if (!config.redis) this.skip();
|
||||
if (!config.redis?.enabled) this.skip();
|
||||
client.get(`${endpoint}/statusRequests`)
|
||||
.then(res => {
|
||||
assert.strictEqual(res.status, 200);
|
||||
@@ -100,7 +100,7 @@ describe("getStatus", () => {
|
||||
});
|
||||
|
||||
it("Should be able to get status with statusRequests", function (done) {
|
||||
if (!config.redis) this.skip();
|
||||
if (!config.redis?.enabled) this.skip();
|
||||
client.get(endpoint)
|
||||
.then(res => {
|
||||
assert.strictEqual(res.status, 200);
|
||||
|
||||
@@ -11,7 +11,7 @@ const randKey2 = genRandom(16);
|
||||
|
||||
describe("redis test", function() {
|
||||
before(async function() {
|
||||
if (!config.redis) this.skip();
|
||||
if (!config.redis?.enabled) this.skip();
|
||||
await redis.set(randKey1, randValue1);
|
||||
});
|
||||
it("Should get stored value", (done) => {
|
||||
|
||||
@@ -63,7 +63,7 @@ const checkUserVIP = async (publicID: HashedUserID) => {
|
||||
|
||||
describe("tempVIP test", function() {
|
||||
before(async function() {
|
||||
if (!config.redis) this.skip();
|
||||
if (!config.redis?.enabled) this.skip();
|
||||
|
||||
const insertSponsorTimeQuery = 'INSERT INTO "sponsorTimes" ("videoID", "startTime", "endTime", "votes", "locked", "UUID", "userID", "timeSubmitted", "views", "category", "shadowHidden") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
|
||||
await db.prepare("run", insertSponsorTimeQuery, ["channelid-convert", 0, 1, 0, 0, UUID0, "testman", 0, 50, "sponsor", 0]);
|
||||
|
||||
Reference in New Issue
Block a user