April 2018
Intermediate to advanced
374 pages
8h 35m
English
Following the Python example, I used kubectl on the command line to deploy the code, invoking it from the integration test:
it('should deploy the manifests', function() { var manifest_directory = path.normalize(path.join(path.dirname(__filename), '..', '/deploy')) const exec = util.promisify(require('child_process').exec); return exec('kubectl apply -f '+manifest_directory) .then((res) => { // console.log(util.inspect(res)); expect(res.stdout).to.not.be.null; expect(res.stderr).to.be.empty; }, (err) => { expect(err).to.be.null; })})
This particular bit of code is dependent on where you have this test case and its relative directory to the deploy directory where the manifests are stored, and like the preceding example ...
Read now
Unlock full access