-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
audrastump
committed
Nov 27, 2024
1 parent
47a9864
commit ef71a42
Showing
1 changed file
with
2 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,23 @@ | ||
import * as fileUtils from './fileUtils' | ||
import * as manifestStabilityUtils from './manifestStabilityUtils' | ||
import * as path from 'path' | ||
import * as fs from 'fs' | ||
import {before} from 'node:test' | ||
import {Kubectl} from '../types/kubectl' | ||
|
||
describe('manifestStabilityUtils', () => { | ||
|
||
const resourceType = 'microsoft.containerservice/fleets' | ||
const kc = new Kubectl('') | ||
const resources = [ | ||
{ | ||
type: 'deployment', | ||
name: 'test', | ||
namespace: 'default' | ||
} | ||
] | ||
const kc = new Kubectl('') | ||
const resourceType = 'microsoft.containerservice/fleets' | ||
|
||
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) | ||
|
||
expect(checkRolloutStatusSpy).not.toHaveBeenCalled() | ||
expect(spy).toHaveReturned() | ||
}) | ||
|
||
|
||
}) |