fix test expectation in merchant-refund-api

This commit is contained in:
Florian Dold 2021-08-04 17:47:28 +02:00
parent f88e14f66d
commit 17f2132b4a
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
3 changed files with 4 additions and 10 deletions

View File

@ -613,12 +613,8 @@ export class Configuration {
} }
getAmount(section: string, option: string): ConfigValue<AmountJson> { getAmount(section: string, option: string): ConfigValue<AmountJson> {
const val = ( const val = this.findEntry(section, option)?.value;
this.sectionMap[section] ?? { return new ConfigValue(section, option, val, (x) =>
entries: {},
}
).entries[option];
return new ConfigValue(section, option, val.value, (x) =>
Amounts.parseOrThrow(x), Amounts.parseOrThrow(x),
); );
} }

View File

@ -145,9 +145,7 @@ async function testRefundApiWithFulfillmentUrl(
console.log(publicOrderStatusResp.status); console.log(publicOrderStatusResp.status);
console.log(publicOrderStatusResp.data); console.log(publicOrderStatusResp.data);
// We didn't give any authentication, so we should get a fulfillment URL back // We didn't give any authentication, so we should get a fulfillment URL back
t.assertTrue(publicOrderStatusResp.status === 202); t.assertTrue(publicOrderStatusResp.status === 403);
const fu = publicOrderStatusResp.data.fulfillment_url;
t.assertTrue(typeof fu === "string" && fu.startsWith("https://example.com"));
} }
async function testRefundApiWithFulfillmentMessage( async function testRefundApiWithFulfillmentMessage(

View File

@ -274,7 +274,7 @@ export async function checkExchangeHttpd(
* Do some basic checks in the configuration of a Taler deployment. * Do some basic checks in the configuration of a Taler deployment.
*/ */
export async function lintExchangeDeployment(): Promise<void> { export async function lintExchangeDeployment(): Promise<void> {
if (process.getuid() != 1) { if (process.getuid() != 0) {
console.log( console.log(
"warning: the exchange deployment linter is designed to be run as root", "warning: the exchange deployment linter is designed to be run as root",
); );