diff options
author | Amichai Hemli <amichai.hemli@intl.att.com> | 2019-10-29 12:54:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-10-29 12:54:14 +0000 |
commit | 6b3717d92d93e756f30c84e89dd5873226907e62 (patch) | |
tree | 9c9cd0ca8a159c74662c15346f60ccd2ecdf16cd /vid-webpack-master/cypress/support | |
parent | f8acfcf82a1b99eb2d293c03314d5c12b87540d1 (diff) | |
parent | 0b2078ffa780f0e930a98f55f38fa7697ffba84c (diff) |
Merge "Add another vfm-upgrade test"
Diffstat (limited to 'vid-webpack-master/cypress/support')
3 files changed, 270 insertions, 7 deletions
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_instance.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_instance.json new file mode 100644 index 000000000..a697d0b29 --- /dev/null +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_instance.json @@ -0,0 +1,101 @@ +{ + "action": "None", + "instanceName": "PST-VfMod-Replace-5", + "instanceId": "6196ab1f-2349-4b32-9b6c-cffeb0ccc79c", + "orchStatus": "Active", + "productFamilyId": null, + "lcpCloudRegionId": null, + "tenantId": null, + "cloudOwner": null, + "modelInfo": { + "modelInvariantId": "b3a1a119-dede-4ed0-b077-2a617fa519a3", + "modelVersionId": "06c415d8-afc2-4bcb-a131-e4db4b8e96ce", + "modelName": "xbi test module replace", + "modelType": "service", + "modelVersion": "1.0" + }, + "globalSubscriberId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb", + "subscriptionServiceType": "Emanuel", + "owningEntityId": null, + "owningEntityName": null, + "tenantName": null, + "aicZoneId": null, + "aicZoneName": null, + "projectName": null, + "rollbackOnFailure": null, + "isALaCarte": true, + "vnfs": { + "d520268f-7489-4662-be59-f81495b3a069": { + "action": "None", + "instanceName": "PST-VfMod-Replace-5-Vnf", + "instanceId": "d520268f-7489-4662-be59-f81495b3a069", + "orchStatus": "Active", + "productFamilyId": null, + "lcpCloudRegionId": "olson5a", + "tenantId": "7ff7b1a4fe954f71ab79d3160ec3eb08", + "cloudOwner": "irma-aic", + "modelInfo": { + "modelCustomizationName": "xbi test module replace 0", + "modelCustomizationId": "84ea2603-b892-4b63-b7ad-e53b902eacdb", + "modelInvariantId": "5626a5ec-7dce-4cc1-b025-bdb7abb2f058", + "modelVersionId": "fb0fea03-db45-4617-a2a8-0910309e5c86", + "modelName": "xbi test module replace", + "modelType": "vnf", + "modelVersion": "1.0" + }, + "instanceType": "xbi test module replace/xbi test module replace 0", + "provStatus": "PREPROV", + "inMaint": false, + "uuid": "fb0fea03-db45-4617-a2a8-0910309e5c86", + "originalName": "xbi test module replace 0", + "legacyRegion": null, + "lineOfBusiness": null, + "platformName": null, + "trackById": "d520268f-7489-4662-be59-f81495b3a069", + "vfModules": { + "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": { + "b0732bed-3ddf-43cc-b193-7f18db84e476": { + "action": "None", + "instanceName": "PST-VfMod-Replace-5-Vfmod", + "instanceId": "b0732bed-3ddf-43cc-b193-7f18db84e476", + "orchStatus": "Active", + "productFamilyId": null, + "lcpCloudRegionId": null, + "tenantId": null, + "cloudOwner": null, + "modelInfo": { + "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0", + "modelCustomizationId": "3f1f0fcb-8a88-4612-a794-3912613ed9e8", + "modelInvariantId": "d887658e-2a89-4baf-83e2-b189601a1a7c", + "modelVersionId": "04b21d26-9780-4956-8329-b22b049329f4", + "modelType": "vfModule" + }, + "instanceType": null, + "provStatus": null, + "inMaint": false, + "uuid": "04b21d26-9780-4956-8329-b22b049329f4", + "originalName": "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0", + "legacyRegion": null, + "lineOfBusiness": null, + "platformName": null, + "trackById": "b0732bed-3ddf-43cc-b193-7f18db84e476", + "isBase": true, + "volumeGroupName": null + } + } + }, + "networks": {} + } + }, + "networks": {}, + "vrfs": {}, + "vnfGroups": {}, + "collectionResources": {}, + "validationCounter": 0, + "existingVNFCounterMap": { + "84ea2603-b892-4b63-b7ad-e53b902eacdb": 1 + }, + "existingNetworksCounterMap": {}, + "existingVnfGroupCounterMap": {}, + "existingVRFCounterMap": {} +}
\ No newline at end of file diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_model.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_model.json new file mode 100644 index 000000000..dc79b1420 --- /dev/null +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_model.json @@ -0,0 +1,165 @@ +{ + "service": { + "uuid": "06c415d8-afc2-4bcb-a131-e4db4b8e96ce", + "invariantUuid": "b3a1a119-dede-4ed0-b077-2a617fa519a3", + "name": "xbi test module replace", + "version": "1.0", + "toscaModelURL": null, + "category": "Emanuel", + "serviceType": "", + "serviceRole": "", + "description": "test module replacement feature", + "serviceEcompNaming": "true", + "instantiationType": "A-La-Carte", + "inputs": {}, + "vidNotions": { + "instantiationUI": "legacy", + "modelCategory": "other", + "viewEditUI": "legacy", + "instantiationType": "ALaCarte" + } + }, + "vnfs": { + "xbi test module replace 0": { + "uuid": "fb0fea03-db45-4617-a2a8-0910309e5c86", + "invariantUuid": "5626a5ec-7dce-4cc1-b025-bdb7abb2f058", + "description": "VSP for testing module replacement feature", + "name": "xbi test module replace", + "version": "1.0", + "customizationUuid": "84ea2603-b892-4b63-b7ad-e53b902eacdb", + "inputs": {}, + "commands": {}, + "properties": { + "nf_function": "OFFLINE-CHARGING-GATEWAY", + "vnf_name": "zolson5avocg01", + "eth1_ip_range": "10.0.0.10", + "ocgmgr_image_name": "vOCG_MGR_SNAP_20180130" + }, + "type": "VF", + "modelCustomizationName": "xbi test module replace 0", + "vfModules": { + "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": { + "uuid": "04b21d26-9780-4956-8329-b22b049329f4", + "invariantUuid": "d887658e-2a89-4baf-83e2-b189601a1a7c", + "customizationUuid": "3f1f0fcb-8a88-4612-a794-3912613ed9e8", + "description": null, + "name": "XbiTestModuleReplace..base_ocg..module-0", + "version": "1", + "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0", + "properties": { + "minCountInstances": 1, + "maxCountInstances": 1, + "initialCount": 1, + "vfModuleLabel": "base_ocg", + "baseModule": true + }, + "inputs": {}, + "volumeGroupAllowed": false + }, + "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": { + "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6", + "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d", + "customizationUuid": "9d428546-00c6-468b-94de-2d4e136459cd", + "description": null, + "name": "XbiTestModuleReplace..ocgmgr..module-1", + "version": "1", + "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ocgmgr", + "baseModule": false + }, + "inputs": {}, + "volumeGroupAllowed": true + } + }, + "volumeGroups": { + "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": { + "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6", + "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d", + "customizationUuid": "9d428546-00c6-468b-94de-2d4e136459cd", + "description": null, + "name": "XbiTestModuleReplace..ocgmgr..module-1", + "version": "1", + "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ocgmgr", + "baseModule": false + }, + "inputs": {} + } + }, + "vfcInstanceGroups": {} + } + }, + "networks": {}, + "collectionResources": {}, + "configurations": {}, + "fabricConfigurations": {}, + "serviceProxies": {}, + "vfModules": { + "xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0": { + "uuid": "04b21d26-9780-4956-8329-b22b049329f4", + "invariantUuid": "d887658e-2a89-4baf-83e2-b189601a1a7c", + "customizationUuid": "3f1f0fcb-8a88-4612-a794-3912613ed9e8", + "description": null, + "name": "XbiTestModuleReplace..base_ocg..module-0", + "version": "1", + "modelCustomizationName": "XbiTestModuleReplace..base_ocg..module-0", + "properties": { + "minCountInstances": 1, + "maxCountInstances": 1, + "initialCount": 1, + "vfModuleLabel": "base_ocg", + "baseModule": true + }, + "inputs": {}, + "volumeGroupAllowed": false + }, + "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": { + "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6", + "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d", + "customizationUuid": "9d428546-00c6-468b-94de-2d4e136459cd", + "description": null, + "name": "XbiTestModuleReplace..ocgmgr..module-1", + "version": "1", + "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ocgmgr", + "baseModule": false + }, + "inputs": {}, + "volumeGroupAllowed": true + } + }, + "volumeGroups": { + "xbitestmodulereplace0..XbiTestModuleReplace..ocgmgr..module-1": { + "uuid": "17dc819b-6cae-40e6-aea0-3afb856646f6", + "invariantUuid": "9fe2a0bb-e1e2-4dfd-9566-a7dfc3adc07d", + "customizationUuid": "9d428546-00c6-468b-94de-2d4e136459cd", + "description": null, + "name": "XbiTestModuleReplace..ocgmgr..module-1", + "version": "1", + "modelCustomizationName": "XbiTestModuleReplace..ocgmgr..module-1", + "properties": { + "minCountInstances": 0, + "maxCountInstances": null, + "initialCount": 0, + "vfModuleLabel": "ocgmgr", + "baseModule": false + }, + "inputs": {} + } + }, + "pnfs": {}, + "vnfGroups": {}, + "vrfs": {} +} diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts b/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts index 052fb8a4c..6fff0bc2d 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts @@ -107,14 +107,13 @@ function initAsyncInstantiation(response? : JSON, delay?: number, status?: numbe }) } -function mockLatestVersionForService(uuidObject :any) { - if(uuidObject && uuidObject.serviceUuid && uuidObject.invariantId){ +function mockLatestVersionForService(serviceUuid: string, invariantId: string) { cy.server().route({ - url: Cypress.config('baseUrl') + '/aai_get_newest_model_version_by_invariant/' + uuidObject.invariantId, + url: Cypress.config('baseUrl') + '/aai_get_newest_model_version_by_invariant/' + invariantId, method: 'GET', status: 200, response: { - "modelVersionId": uuidObject.serviceUuid, + "modelVersionId": serviceUuid, "modelName": "SERVICE_INSTANCE_NAME", "modelVersion": "2.0", "distributionStatus": "DISTRIBUTION_COMPLETE_OK", @@ -122,16 +121,14 @@ function mockLatestVersionForService(uuidObject :any) { "modelDescription": "modelDescription" }, }).as("expectLatestServiceModelUpgradeVersion") - } } -function initVidMock(...args :any): void { +function initVidMock(): void { initGetToMenuInfo(); initCategoryParameter(); initFlags(); initAuditInfoVID(); initAuditInfoMSO(); - mockLatestVersionForService(args[0]); } |