github.com/kyma-project/kyma-environment-broker@v0.0.1/testing/e2e/skr/skr-test/test.js (about) 1 const { 2 gatherOptions, 3 oidcE2ETest, 4 machineTypeE2ETest, 5 btpManagerSecretTest, 6 } = require('./index'); 7 const {getOrProvisionSKR} = require('./provision/provision-skr'); 8 const {deprovisionAndUnregisterSKR} = require('./provision/deprovision-skr'); 9 10 const skipProvisioning = process.env.SKIP_PROVISIONING === 'true'; 11 const provisioningTimeout = 1000 * 60 * 30; // 30m 12 const deprovisioningTimeout = 1000 * 60 * 95; // 95m 13 let globalTimeout = 1000 * 60 * 70; // 70m 14 const slowTime = 5000; 15 16 describe('SKR test', function() { 17 if (!skipProvisioning) { 18 globalTimeout += provisioningTimeout + deprovisioningTimeout; 19 } 20 this.timeout(globalTimeout); 21 this.slow(slowTime); 22 23 let options = gatherOptions(); // with default values 24 let skr; 25 const getShootInfoFunc = function() { 26 return skr.shoot; 27 }; 28 const getShootOptionsFunc = function() { 29 return options; 30 }; 31 32 before('Ensure SKR is provisioned', async function() { 33 this.timeout(provisioningTimeout); 34 skr = await getOrProvisionSKR(options, skipProvisioning, provisioningTimeout); 35 options = skr.options; 36 }); 37 38 // Run BTP Manager Secret tests 39 btpManagerSecretTest(); 40 41 // Run OIDC tests 42 oidcE2ETest(getShootOptionsFunc, getShootInfoFunc); 43 44 // Run Machine Type tests 45 machineTypeE2ETest(getShootOptionsFunc, getShootInfoFunc); 46 47 after('Cleanup the resources', async function() { 48 this.timeout(deprovisioningTimeout); 49 await deprovisionAndUnregisterSKR(options, deprovisioningTimeout, skipProvisioning, false); 50 }); 51 });