From 604dc61e5bda6f72e57ace12715de25dcdd97d7b Mon Sep 17 00:00:00 2001 From: giomella Date: Mon, 9 Dec 2024 11:42:20 +0100 Subject: [PATCH] [PPANTT-194] fix test --- performance-test/src/gps-mbd-service_test.js | 4 ++-- performance-test/src/modules/client.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/performance-test/src/gps-mbd-service_test.js b/performance-test/src/gps-mbd-service_test.js index ea09a48..160977a 100644 --- a/performance-test/src/gps-mbd-service_test.js +++ b/performance-test/src/gps-mbd-service_test.js @@ -1,4 +1,4 @@ -import http from 'k6/http'; +import { postToGPSMBDService } from './modules/client.js'; import { check } from 'k6'; import { SharedArray } from 'k6/data'; @@ -33,7 +33,7 @@ function postcondition() { } export default function () { - let response = http.post(`${gpsMbdHost}/mbd/paymentOption`, "00000000000"); + let response = postToGPSMBDService(`${gpsMbdHost}/mbd/paymentOption`, "00000000000"); console.info(`GPS MBD Service buildMbdPaymentOption status ${response.status}`); let responseBody = JSON.parse(response.body); diff --git a/performance-test/src/modules/client.js b/performance-test/src/modules/client.js index 4b7dadb..28ab6e3 100644 --- a/performance-test/src/modules/client.js +++ b/performance-test/src/modules/client.js @@ -1,8 +1,8 @@ import http from 'k6/http'; -const subKey = `${__ENV.OCP_APIM_SUBSCRIPTION_KEY}`; +const subKey = `${__ENV.API_SUBSCRIPTION_KEY}`; -export function example(url, ciFiscalCode) { +export function postToGPSMBDService(url, ciFiscalCode) { let headers = { 'Ocp-Apim-Subscription-Key': subKey, "Content-Type": "application/json"