mirror of
https://github.com/Azure/k8s-deploy.git
synced 2026-06-21 18:59:27 +08:00
ecec5912ba
* switch none deployment strategy to basic * update readme * update deployment strategy fallthrough logic * comment fixed * add disclaimer for basic strategy only supporting deploy action
26 lines
872 B
TypeScript
26 lines
872 B
TypeScript
import {DeploymentStrategy, parseDeploymentStrategy} from './deploymentStrategy'
|
|
|
|
describe('Deployment strategy type', () => {
|
|
test('it has required values', () => {
|
|
const vals = <any>Object.values(DeploymentStrategy)
|
|
expect(vals.includes('canary')).toBe(true)
|
|
expect(vals.includes('blue-green')).toBe(true)
|
|
expect(vals.includes('basic')).toBe(true)
|
|
})
|
|
|
|
test('it can parse valid values from a string', () => {
|
|
expect(parseDeploymentStrategy('blue-green')).toBe(
|
|
DeploymentStrategy.BLUE_GREEN
|
|
)
|
|
expect(parseDeploymentStrategy('Blue-green')).toBe(
|
|
DeploymentStrategy.BLUE_GREEN
|
|
)
|
|
expect(parseDeploymentStrategy('BLUE-GREEN')).toBe(
|
|
DeploymentStrategy.BLUE_GREEN
|
|
)
|
|
expect(parseDeploymentStrategy('blue-greeN')).toBe(
|
|
DeploymentStrategy.BLUE_GREEN
|
|
)
|
|
})
|
|
})
|