linting
This commit is contained in:
parent
edb724c0d6
commit
9769f69601
@ -544,7 +544,7 @@ export class Configuration {
|
|||||||
* Get lower-cased section names.
|
* Get lower-cased section names.
|
||||||
*/
|
*/
|
||||||
getSectionNames(): string[] {
|
getSectionNames(): string[] {
|
||||||
return Object.keys(this.sectionMap).map((x) => x.toLowerCase());
|
return Object.keys(this.sectionMap).map((x) => x.toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
getString(section: string, option: string): ConfigValue<string> {
|
getString(section: string, option: string): ConfigValue<string> {
|
||||||
|
@ -198,6 +198,16 @@ async function checkWireConfig(context: LintContext): Promise<void> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (accounts.size === 0) {
|
||||||
|
console.log(
|
||||||
|
"error: No accounts configured (no sections EXCHANGE_ACCOUNT-*).",
|
||||||
|
);
|
||||||
|
if (!context.cont) {
|
||||||
|
console.log("Aborting further checks.");
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const acc of accounts) {
|
for (const acc of accounts) {
|
||||||
if (!credentials.has(acc)) {
|
if (!credentials.has(acc)) {
|
||||||
console.log(
|
console.log(
|
||||||
@ -207,19 +217,19 @@ async function checkWireConfig(context: LintContext): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const acc of accounts) {
|
for (const acc of accounts) {
|
||||||
// test debit history
|
// test credit history
|
||||||
{
|
{
|
||||||
const res = await sh(
|
const res = await sh(
|
||||||
context,
|
context,
|
||||||
"su -l --shell /bin/sh " +
|
"su -l --shell /bin/sh " +
|
||||||
"-c 'taler-exchange-wire-gateway-client -s exchange-accountcredentials-${acc} --debit-history'" +
|
`-c 'taler-exchange-wire-gateway-client -s exchange-accountcredentials-${acc} --credit-history'` +
|
||||||
"taler-exchange-wire",
|
"taler-exchange-wire",
|
||||||
);
|
);
|
||||||
if (res.status != 0) {
|
if (res.status != 0) {
|
||||||
console.log(res.stdout);
|
console.log(res.stdout);
|
||||||
console.log(res.stderr);
|
console.log(res.stderr);
|
||||||
console.log(
|
console.log(
|
||||||
"error: Could not run wirewatch. Please review logs above.",
|
"error: Could not run taler-exchange-wire-gateway-client. Please review logs above.",
|
||||||
);
|
);
|
||||||
if (!context.cont) {
|
if (!context.cont) {
|
||||||
console.log("Aborting further checks.");
|
console.log("Aborting further checks.");
|
||||||
|
Loading…
Reference in New Issue
Block a user