'use strict';describe('Config Map', () => { before(done => { helm .withValueFile('tests/configmap/values.yaml') .go(done); });
describe('Manifest', () => { let map; before(() => { map = results.ofType('ConfigMap')[0]; }); it('should be apiVersion 1', () => { map.apiVersion.should.eql('v1'); }); it('should have standard labels', () => { map.metadata.labels.should.eql({ app: 'your-web-app', version: '1', heritage: 'Tiller', release: 'RELEASE-NAME', chart: 'helm-your-web-app-0.1.0' }); }); it('should have valid metadata', () => { map.metadata.name.should.eql('your-web-app'); }); it('should have a docker-host key', () => { map.data['some-key'].should.eql('some-value'); }); });});❯ helm-test helm-test [info] Welcome to helm-test v0.1.13! +0ms helm-test [info] Testing... +0ms
Config Map ✓ should have one manifest Manifest ✓ should be apiVersion 1 ✓ should have standard labels ✓ should have valid metadata ✓ should have a docker-host key
Deployment Manifest Stateful ✓ should have standard labels ✓ should have version metadata ✓ should have valid metadata.name ✓ should have configured replicas ✓ should have a selector that matches the template ✓ should be the correct api vers ✓ should have the istio init containers ✓ should have a serviceName ✓ should have a rollingUpdate strategy ✓ should have a volumeClaimTemplate ✓ should have volume mounts Disruption Budget ✓ should have a pod disruption budget ✓ name should be suffixed with pdb ✓ should target the right selector ✓ should have standard labels Container ✓ should be be called master ✓ should always pull the image ✓ should have the right image