From fc15ad2554a21b9e86321fc183aab09ba149e15a Mon Sep 17 00:00:00 2001 From: Christina Ying Wang Date: Mon, 7 Nov 2022 12:09:17 -0800 Subject: [PATCH] Fix typo: intialise -> initialize Missing "i" Signed-off-by: Christina Ying Wang --- src/lib/contracts.ts | 2 +- src/supervisor.ts | 4 ++-- test/integration/device-state.spec.ts | 4 ++-- test/integration/lib/contracts.spec.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/contracts.ts b/src/lib/contracts.ts index 5e99a1b7..da57a4b5 100644 --- a/src/lib/contracts.ts +++ b/src/lib/contracts.ts @@ -32,7 +32,7 @@ type ContractRequirements = { const contractRequirementVersions: ContractRequirements = {}; -export function intialiseContractRequirements(opts: { +export function initializeContractRequirements(opts: { supervisorVersion: string; deviceType: string; l4tVersion?: string; diff --git a/src/supervisor.ts b/src/supervisor.ts index 3d741d41..bdd03168 100644 --- a/src/supervisor.ts +++ b/src/supervisor.ts @@ -8,7 +8,7 @@ import * as v1 from './device-api/v1'; import * as v2 from './device-api/v2'; import logMonitor from './logging/monitor'; -import { intialiseContractRequirements } from './lib/contracts'; +import { initializeContractRequirements } from './lib/contracts'; import { normaliseLegacyDatabase } from './lib/legacy'; import * as osRelease from './lib/os-release'; import log from './lib/supervisor-console'; @@ -42,7 +42,7 @@ export class Supervisor { const conf = await config.getMany(startupConfigFields); - intialiseContractRequirements({ + initializeContractRequirements({ supervisorVersion: version, deviceType: await config.get('deviceType'), l4tVersion: await osRelease.getL4tVersion(), diff --git a/test/integration/device-state.spec.ts b/test/integration/device-state.spec.ts index 015e9bef..0cef38f8 100644 --- a/test/integration/device-state.spec.ts +++ b/test/integration/device-state.spec.ts @@ -8,7 +8,7 @@ import * as deviceState from '~/src/device-state'; import { appsJsonBackup, loadTargetFromFile } from '~/src/device-state/preload'; import { TargetState } from '~/src/types'; import { promises as fs } from 'fs'; -import { intialiseContractRequirements } from '~/lib/contracts'; +import { initializeContractRequirements } from '~/lib/contracts'; import { testfs } from 'mocha-pod'; import { createDockerImage } from '~/test-lib/docker-helper'; @@ -21,7 +21,7 @@ describe('device-state', () => { // Set the device uuid await config.set({ uuid: 'local' }); - intialiseContractRequirements({ + initializeContractRequirements({ supervisorVersion: '11.0.0', deviceType: 'intel-nuc', }); diff --git a/test/integration/lib/contracts.spec.ts b/test/integration/lib/contracts.spec.ts index 5ed7d6bd..7a4be20d 100644 --- a/test/integration/lib/contracts.spec.ts +++ b/test/integration/lib/contracts.spec.ts @@ -5,7 +5,7 @@ import * as semver from 'semver'; import * as constants from '~/lib/constants'; import { containerContractsFulfilled, - intialiseContractRequirements, + initializeContractRequirements, validateContract, } from '~/lib/contracts'; import * as osRelease from '~/lib/os-release'; @@ -14,7 +14,7 @@ import * as fsUtils from '~/lib/fs-utils'; describe('lib/contracts', () => { before(() => { - intialiseContractRequirements({ + initializeContractRequirements({ supervisorVersion, deviceType: 'intel-nuc', l4tVersion: '32.2', @@ -436,7 +436,7 @@ describe('L4T version detection', () => { execStub.restore(); } seedExec(version); - intialiseContractRequirements({ + initializeContractRequirements({ supervisorVersion, deviceType: 'intel-nuc', l4tVersion: await osRelease.getL4tVersion(),