Skip to content

Commit

Permalink
Fix airnode-examples coingecko-e2e example file tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dcroote committed Oct 7, 2022
1 parent 3d67eeb commit 959d30c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { getCommonSecrets, writeSecrets } from '../secrets-utils';

const createSecrets = async (generateExampleFile = false) => {
const secrets = await getCommonSecrets(generateExampleFile).concat(['EVERYTHING_AUTHORIZER=', 'NOTHING_AUTHORIZER=']);
const secrets = await getCommonSecrets(generateExampleFile).concat([
'EVERYTHING_AUTHORIZER=0x2bdCC0de6bE1f7D2ee689a0342D76F52E8EFABa3',
'NOTHING_AUTHORIZER=0x7969c5eD335650692Bc04293B07F5BF2e7A673C0',
]);

writeSecrets(__dirname, secrets, generateExampleFile);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ describe('Verifies that all config.example.json files are up to date', () => {

if (!goCreateConfig.success) throw goCreateConfig.error;

const generatedConfigFile = readFileSync(path).toString();
const generatedConfigFile = readFileSync(path)
.toString()
// fix prettier newline disagreement with generated config for `coingecko-e2e`
.replace(/\[\n\s+"\${(\w+)_AUTHORIZER}"\n\s+\],/g, '["${$1_AUTHORIZER}"],');

// Revert the changes done to the example file
writeFileSync(path, currentConfigFile);
Expand Down

0 comments on commit 959d30c

Please sign in to comment.