Skip to content

Commit

Permalink
fix deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
pasqualespica committed Oct 7, 2022
1 parent 97b0f29 commit 1445fe0
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 95 deletions.
6 changes: 6 additions & 0 deletions helm/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: microservice-chart
repository: https://pagopa.github.io/aks-microservice-chart-blueprint
version: 1.21.0
digest: sha256:e3deccb7ac0b5d85af0c726f28316ebe7a3795cbf54522330c33474b0bae309a
generated: "2022-10-07T11:12:09.286079+02:00"
2 changes: 1 addition & 1 deletion helm/values-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: pagopadcommonacr.azurecr.io/pagopaspontaneouspayments
tag: "0.1.0-1" #improve
tag: "0.1.0" #improve
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
2 changes: 1 addition & 1 deletion helm/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: pagopapcommonacr.azurecr.io/pagopaspontaneouspayments
tag: "0.1.0-1" #improve
tag: "0.1.0" #improve
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down
12 changes: 6 additions & 6 deletions helm/values-uat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ microservice-chart:
fullnameOverride: ""
image:
repository: pagopaucommonacr.azurecr.io/pagopaspontaneouspayments
tag: "0.1.0-1" #improve
tag: "0.1.0" #improve
pullPolicy: Always
livenessProbe:
httpGet:
Expand Down Expand Up @@ -67,15 +67,15 @@ microservice-chart:
EC_CONTAINER_NAME: "creditor_institutions"
SERVICE_CONTAINER_NAME: "services"
GPD_HOST: https://api.uat.platform.pagopa.it/gpd/api/v1
IUV_GENERATOR_HOST: https://api.uat.platform.pagopa.it/shared/iuv-generator-service/v1
IUV_GENERATOR_HOST: https://weuuat.shared.internal.uat.platform.pagopa.it/pagopa-iuv-generator-service
AUX_DIGIT: "3"
CONNECTION_TIMEOUT: "1000"
CONNECTION_TIMEOUT: "1500"
RETRY_GPD_MAX_ATTEMPTS: "1"
RETRY_GPD_MAX_DELAY: "200"
RETRY_GPD_MAX_DELAY: "500"
RETRY_IUV_GENERATOR_MAX_ATTEMPTS: "1"
RETRY_IUV_GENERATOR_MAX_DELAY: "200"
RETRY_IUV_GENERATOR_MAX_DELAY: "300"
RETRY_EXT_SERVICE_MAX_ATTEMPTS: "1"
RETRY_EXT_SERVICE_MAX_DELAY: "200"
RETRY_EXT_SERVICE_MAX_DELAY: "300"
LOGGING_LEVEL: "INFO"
envSecret:
COSMOS_KEY: cosmos-gps-weu-u-pkey
Expand Down
82 changes: 41 additions & 41 deletions load-test/src/create_spontaneous_payment.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,48 +22,48 @@ const gpdUrlBasePath = `${vars.gpdBaseUrl}`;

const creditor_institution_code = `organizationNew`;

export function setup() {
// 2. setup code (once)
// The setup code runs, setting up the test environment (optional) and generating data
// used to reuse code for the same VU
const params = {
headers: {
'Content-Type': 'application/json'
},
};
const response = createCreditorInstitutionEnrollment(rootUrl, params, creditor_institution_code);

console.log(`setup ... ${response.status}`);

// check(response, {
// "status is 201 or 409": (response) => (response.status === 201 || response.status === 409),
// });

// precondition is moved to default fn because in this stage
// __VU is always 0 and cannot be used to create env properly
}
//export function setup() {
// // 2. setup code (once)
// // The setup code runs, setting up the test environment (optional) and generating data
// // used to reuse code for the same VU
// const params = {
// headers: {
// 'Content-Type': 'application/json'
// },
// };
// const response = createCreditorInstitutionEnrollment(rootUrl, params, creditor_institution_code);
//
// console.log(`setup ... ${response.status}`);
//
//// check(response, {
//// "status is 201 or 409": (response) => (response.status === 201 || response.status === 409),
//// });
//
// // precondition is moved to default fn because in this stage
// // __VU is always 0 and cannot be used to create env properly
//}

function precondition() {
// no pre conditions
}

function postcondition(iupd, params) {

// Delete the newly created debt position.
let tag = {
gpdMethod: "DeleteDebtPosition",
};

let url = `${gpdUrlBasePath}/organizations/${creditor_institution_code}/debtpositions/${iupd}`;

let r = http.del(url, params);

console.log("DeleteDebtPosition call - creditor_institution_code " + creditor_institution_code + ", iupd " + iupd + ", Status " + r.status);

check(r, {
"DeleteDebtPosition status is 200": (_r) => r.status === 200,
}, tag);
}
//function postcondition(iupd, params) {
//
// // Delete the newly created debt position.
// let tag = {
// gpdMethod: "DeleteDebtPosition",
// };
//
// let url = `${gpdUrlBasePath}/organizations/${creditor_institution_code}/debtpositions/${iupd}`;
//
// let r = http.del(url, params);
//
// console.log("DeleteDebtPosition call - creditor_institution_code " + creditor_institution_code + ", iupd " + iupd + ", Status " + r.status);
//
// check(r, {
// "DeleteDebtPosition status is 200": (_r) => r.status === 200,
// }, tag);
//}

export default function() {

Expand Down Expand Up @@ -99,7 +99,7 @@ export default function() {
},
"service":
{
"id": "donation-pagopa-svr-id1",
"id": "12345",
"properties":
[
{ "name": "amount", "value": amount },
Expand All @@ -125,9 +125,9 @@ export default function() {
}, tag);

// If flag delete_debt_position is set to true the debit position is deleted after being created
if (r.status === 201 && delete_debt_position === "true") {
postcondition(r.json().iupd, params);
}
// if (r.status === 201 && delete_debt_position === "true") {
// postcondition(r.json().iupd, params);
// }


}
2 changes: 1 addition & 1 deletion load-test/src/local.environment.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"environment": [
{
"env": "local",
"host": "http://localhost:8080",
"host": "http://localhost:55397",
"basePath": "organizations",
"gpdBaseUrl": "https://api.dev.platform.pagopa.it/gpd/api/v1",
"deleteDebtPosition": true
Expand Down
18 changes: 7 additions & 11 deletions load-test/src/test-types/load.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,24 @@
],
"stages": [
{
"duration": "1s",
"target": 5
"duration": "1m",
"target": 40
},
{
"duration": "2s",
"target": 5
"duration": "2m",
"target": 40
},
{
"duration": "1s",
"duration": "1m",
"target": 0
}
],
"thresholds": {
"http_req_failed": [
"rate<0.1"
"rate<0.001"
],
"http_req_duration": [
"p(99)<3000"
],
"http_req_duration{gpsMethod:CreateSpontaneousPayment}": [
"p(95)<1000"
"p(99)<1500"
]
}
}

34 changes: 0 additions & 34 deletions load-test/src/test-types/short_stress.json

This file was deleted.

0 comments on commit 1445fe0

Please sign in to comment.