Skip to content

Commit

Permalink
ran prettier command
Browse files Browse the repository at this point in the history
  • Loading branch information
audrastump committed Nov 27, 2024
1 parent 24f19bc commit 4de5c4d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 7 deletions.
4 changes: 3 additions & 1 deletion src/actions/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export async function deploy(

// check manifest stability
core.startGroup('Checking manifest stability')
const resourceType = core.getInput('resource-type') || 'Microsoft.ContainerService/managedClusters'
const resourceType =
core.getInput('resource-type') ||
'Microsoft.ContainerService/managedClusters'
const resourceTypes: Resource[] = getResources(
deployedManifestFiles,
models.DEPLOYMENT_TYPES.concat([
Expand Down
6 changes: 5 additions & 1 deletion src/strategyHelpers/deploymentHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ export async function checkManifestStability(
resources: Resource[],
resourceType: string
): Promise<void> {
await KubernetesManifestUtility.checkManifestStability(kubectl, resources, resourceType)
await KubernetesManifestUtility.checkManifestStability(
kubectl,
resources,
resourceType
)
}

export async function annotateAndLabelResources(
Expand Down
8 changes: 6 additions & 2 deletions src/utilities/manifestStabilityUtils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ describe('manifestStabilityUtils', () => {
it('should return immediately if the resource type is microsoft.containerservice/fleets', async () => {
const spy = jest.spyOn(manifestStabilityUtils, 'checkManifestStability')
const checkRolloutStatusSpy = jest.spyOn(kc, 'checkRolloutStatus')
await manifestStabilityUtils.checkManifestStability(kc, resources, resourceType)
await manifestStabilityUtils.checkManifestStability(
kc,
resources,
resourceType
)

expect(checkRolloutStatusSpy).not.toHaveBeenCalled()
expect(spy).toHaveReturned()
})
})
})
8 changes: 5 additions & 3 deletions src/utilities/manifestStabilityUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ export async function checkManifestStability(
resources: Resource[],
resourceType: string
): Promise<void> {
// Skip if resource type is microsoft.containerservice/fleets
if (resourceType.toLowerCase()=== 'microsoft.containerservice/fleets') {
core.info('Skipping checkManifestStability for microsoft.containerservice/fleets')
// Skip if resource type is microsoft.containerservice/fleets
if (resourceType.toLowerCase() === 'microsoft.containerservice/fleets') {
core.info(
'Skipping checkManifestStability for microsoft.containerservice/fleets'
)
return
}
let rolloutStatusHasErrors = false
Expand Down

0 comments on commit 4de5c4d

Please sign in to comment.