Skip to content

Commit

Permalink
Fix the Updater api that was causing an ncc misfire
Browse files Browse the repository at this point in the history
  • Loading branch information
Barry Gordon committed Sep 27, 2021
1 parent 1a71619 commit 6c4ccc1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions __tests__/updater.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ describe('Updater', () => {
mockApiClient,
mockJobDetails,
[],
'__fixtures__/output/happy_path'
'../__fixtures__/output/happy_path/output.json'
)

beforeEach(async () => {
Expand All @@ -80,7 +80,7 @@ describe('Updater', () => {
mockApiClient,
mockJobDetails,
[],
'__fixtures__/output/happy_path'
'../__fixtures__/output/happy_path/output.json'
)

beforeEach(async () => {
Expand Down Expand Up @@ -111,7 +111,7 @@ describe('Updater', () => {
mockApiClient,
mockJobDetails,
[],
'__fixtures__/output/happy_path'
'../__fixtures__/output/happy_path/output.json'
)

beforeEach(async () => {
Expand Down Expand Up @@ -145,7 +145,7 @@ describe('Updater', () => {
mockApiClient,
mockJobDetails,
[],
'__fixtures__/output/empty'
'../__fixtures__/output/empty/output.json'
)

beforeEach(async () => {
Expand All @@ -172,7 +172,7 @@ describe('Updater', () => {
mockApiClient,
mockJobDetails,
[],
'__fixtures__/output/malformed'
'../__fixtures__/output/malformed/output.json'
)

beforeEach(async () => {
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class Updater {
private readonly apiClient: ApiClient,
private readonly details: JobDetails,
private readonly credentials: Credential[],
private readonly outputFolder = 'output/'
private readonly outputPath = '../output/output.json'
) {
this.docker = new Docker()
}
Expand Down Expand Up @@ -67,7 +67,7 @@ export class Updater {

await ContainerService.run(container)

const outputPath = path.join(__dirname, '../output/output.json')
const outputPath = path.join(__dirname, this.outputPath)
if (!fs.existsSync(outputPath)) {
throw new Error('No output.json created by the fetcher container')
}
Expand Down

0 comments on commit 6c4ccc1

Please sign in to comment.