WIP: 5739-useDocker_inSalix #5

Closed
alexm wants to merge 4 commits from 5739-useDocker_inSalix into master
4 changed files with 1330 additions and 7 deletions
Showing only changes of commit 95f6c6d5d2 - Show all commits

View File

@ -6,8 +6,12 @@ const fs = require('fs-extra');
* @param {Connection} conn MySQL connection object * @param {Connection} conn MySQL connection object
* @returns {Array<Result>} The resultset * @returns {Array<Result>} The resultset
*/ */
async function queryFromFile(conn, file) { async function queryFromFile(conn, file, logger) {
const sql = await fs.readFile(file, 'utf8'); const sql = await fs.readFile(file, 'utf8');
if(logger){
// console.log('TRY', await this.multiQuery(conn, 'SELECT * FROM vn.saleGroup;'));
// console.log('sql: ', sql);
}
return await this.multiQuery(conn, sql); return await this.multiQuery(conn, sql);
} }

View File

@ -273,12 +273,15 @@ class Push extends Command {
let err; let err;
try { try {
console.log(versionDir, script.file);
await connExt.queryFromFile(pushConn, await connExt.queryFromFile(pushConn,
`${versionsDir}/${versionDir}/${script.file}`); `${versionsDir}/${versionDir}/${script.file}`, versionDir == '10724-maroonOrchid');
} catch (e) { } catch (e) {
err = e; err = e;
} }
console.log('HOLAAAAAAAAAAAAAAAAAAA')
// console.log(await conn.query(`SELECT * FROM versionLog LIMIT 1`))
// console.log(await conn.query(`SELECT * FROM vn.saleGroup LIMIT 1`))
await conn.query( await conn.query(
`INSERT INTO versionLog `INSERT INTO versionLog
SET code = ?, SET code = ?,
@ -302,7 +305,7 @@ class Push extends Command {
] ]
); );
if (err) throw err; if (err) console.log('FALLO', err);
nChanges++; nChanges++;
} }

View File

@ -124,14 +124,14 @@ class Run extends Command {
try { try {
const server = new Server(ct, dbConfig); const server = new Server(ct, dbConfig);
const useCustom = opts.ci || opts.network
if (isRandom) { if (isRandom || useCustom) {
try { try {
const netSettings = await ct.inspect({ const netSettings = await ct.inspect({
format: '{{json .NetworkSettings}}' format: '{{json .NetworkSettings}}'
}); });
if (opts.ci || opts.network) { if (useCustom) {
dbConfig.host = opts.network dbConfig.host = opts.network
? netSettings.Networks[opts.network].IPAddress ? netSettings.Networks[opts.network].IPAddress
: netSettings.Gateway; : netSettings.Gateway;

1316
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff