Skip to content

Commit

Permalink
Fix broken deployer tests
Browse files Browse the repository at this point in the history
  • Loading branch information
amarthadan committed Oct 13, 2022
1 parent a7c35f2 commit 557dc56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions packages/airnode-deployer/src/infrastructure/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,23 @@ import path from 'path';
import fs from 'fs';
import pick from 'lodash/pick';
import cloneDeep from 'lodash/cloneDeep';
import { AwsCloudProvider, GcpCloudProvider, loadConfig } from '@api3/airnode-node';
import { AwsCloudProvider, GcpCloudProvider, loadTrustedConfig } from '@api3/airnode-node';
import * as aws from './aws';
import * as gcp from './gcp';
import { version as nodeVersion } from '../../package.json';
import { getSpinner } from '../utils/logger';
import { parseSecretsFile } from '../utils';
import { Directory, DirectoryStructure } from '../utils/infrastructure';
import { mockBucketDirectoryStructure } from '../../test/fixtures';
import { deploymentInfo01, listAirnodes01, listAirnodes02, listAirnodes03 } from '../../test/snapshots';

jest.mock('../../package.json', () => ({
version: '0.8.0',
}));

const exec = jest.fn();
jest.spyOn(util, 'promisify').mockImplementation(() => exec);

import { version as nodeVersion } from '../../package.json';
import * as infrastructure from '.';

const terraformDir = path.resolve(`${__dirname}/../../terraform`);
Expand Down Expand Up @@ -333,7 +337,7 @@ describe('terraformAirnodeApply', () => {
const secretsPath = path.join(__dirname, '..', '..', 'test', 'fixtures', 'secrets.valid.env');
const handlerDir = path.resolve(`${__dirname}/../../.webpack`);
const secrets = parseSecretsFile(secretsPath);
const config = loadConfig(configPath, secrets);
const config = loadTrustedConfig(configPath, secrets);
const bucket = {
name: 'airnode-123456789',
region: 'us-east-1',
Expand Down Expand Up @@ -426,7 +430,7 @@ describe('deployAirnode', () => {
const configPath = path.join(__dirname, '..', '..', 'test', 'fixtures', 'config.aws.valid.json');
const secretsPath = path.join(__dirname, '..', '..', 'test', 'fixtures', 'secrets.valid.env');
const secrets = parseSecretsFile(secretsPath);
const config = loadConfig(configPath, secrets);
const config = loadTrustedConfig(configPath, secrets);
const bucket = {
name: 'airnode-123456789',
region: 'europe-central-1',
Expand Down Expand Up @@ -672,7 +676,7 @@ describe('removeAirnode', () => {
const configPath = path.join(__dirname, '..', '..', 'test', 'fixtures', 'config.aws.valid.json');
const secretsPath = path.join(__dirname, '..', '..', 'test', 'fixtures', 'secrets.valid.env');
const secrets = parseSecretsFile(secretsPath);
const config = loadConfig(configPath, secrets);
const config = loadTrustedConfig(configPath, secrets);
const deploymentId = 'aws40207f25';
const bucket = {
name: 'airnode-123456789',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"logFormat": "plain",
"logLevel": "INFO",
"nodeVersion": "0.9.0",
"nodeVersion": "0.8.0",
"cloudProvider": {
"type": "aws",
"region": "us-east-1",
Expand Down

0 comments on commit 557dc56

Please sign in to comment.