Prepare dockerfile for use, allow configuring via env vars

This commit is contained in:
Ajay
2022-05-03 22:08:44 -04:00
parent a66588619a
commit 5b177a3e53
13 changed files with 93 additions and 46 deletions

View File

@@ -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);

View File

@@ -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) => {

View File

@@ -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]);