mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-28 15:59:27 +08:00
enable fleet cluster deployment (#356)
* added fleet exception to rollout cmd * removed fleet check for rollout * modified casing * modified approach for fleet check * tidying up * defaulting to Microsoft.ContainerService/managedClusters * ran prettier command * modified manifest stablity check * ran prettier check * moved lowercase check to beginning --------- Co-authored-by: audrastump <stumpaudra@microsoft.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import * as manifestStabilityUtils from './manifestStabilityUtils'
|
||||
import {Kubectl} from '../types/kubectl'
|
||||
|
||||
describe('manifestStabilityUtils', () => {
|
||||
const kc = new Kubectl('')
|
||||
const resources = [
|
||||
{
|
||||
type: 'deployment',
|
||||
name: 'test',
|
||||
namespace: 'default'
|
||||
}
|
||||
]
|
||||
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()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user