github.com/kyma-project/kyma-environment-broker@v0.0.1/testing/e2e/skr/skr-test/provision-skr.js (about) 1 const { 2 gatherOptions, 3 } = require('./index'); 4 const {getOrProvisionSKR, getSKRKymaVersion} = require('./provision/provision-skr'); 5 const {expect} = require('chai'); 6 7 const provisioningTimeout = 1000 * 60 * 30; // 30m 8 let globalTimeout = 1000 * 60 * 70; // 70m 9 const slowTime = 5000; 10 11 describe('Provision SKR instance', function() { 12 globalTimeout += provisioningTimeout; 13 14 this.timeout(globalTimeout); 15 this.slow(slowTime); 16 17 let skr; 18 let options = undefined; 19 let isSKRProvisioned = false; 20 let kymaVersion = ''; 21 22 before('Gather default options', async function() { 23 options = gatherOptions(); // with default values 24 }); 25 26 it('should provision SKR cluster', async function() { 27 this.timeout(provisioningTimeout); 28 console.log(`SKR Instance ID: ${options.instanceID}`); 29 skr = await getOrProvisionSKR(options, false, provisioningTimeout); 30 options = skr.options; 31 isSKRProvisioned = true; 32 }); 33 34 it('should fetch SKR kyma version', async function() { 35 kymaVersion = await getSKRKymaVersion(options.instanceID); 36 expect(kymaVersion).to.not.be.empty; 37 }); 38 39 after('Print Shoot Info', async function() { 40 // Print data out for spinnaker. 41 // It is used in spinnaker to pass data to next stages. 42 // More info: https://spinnaker.io/docs/guides/user/kubernetes-v2/run-job-manifest/#spinnaker_property_ 43 44 if (options && options.instanceID) { 45 console.log(`SPINNAKER_PROPERTY_INSTANCE_ID=${options.instanceID}`); 46 } 47 console.log(`SPINNAKER_PROPERTY_PROVISIONED=${isSKRProvisioned}`); 48 console.log(`SPINNAKER_PROPERTY_KYMA_VERSION=${kymaVersion}`); 49 }); 50 });