summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-10-16 12:06:15 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-10-16 12:08:06 +0200
commit15881c7544fdb476c056f5ef14cf8e0da1ec4cb1 (patch)
treed549c2a258b4066bb967e6365efd257ff4f0ceeb
parent226f1281ff1c66031c52040e3558ecabddbd6253 (diff)
Make K6 scripts independently runnable
- define defaults in K6 scrips to make execution via k6 run <script.js> easier - remove leftovers of AAF Issue-ID: AAI-4018 Change-Id: I364002a76f1c6359024bdfadb8566c352c1bd76f Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
-rw-r--r--aai-resources/src/main/resources/aaf/onap/bath_config.csv32
-rw-r--r--aai-resources/src/main/resources/aaf/onap/org.onap.aai.keyfile27
-rw-r--r--aai-resources/src/main/resources/aaf/onap/org.onap.aai.p12bin4158 -> 0 bytes
-rw-r--r--aai-resources/src/main/resources/aaf/onap/org.onap.aai.props14
-rw-r--r--aai-resources/src/main/resources/aaf/onap/org.osaaf.location.props26
-rw-r--r--aai-resources/src/main/resources/aaf/onap/truststoreONAPall.jksbin114865 -> 0 bytes
-rw-r--r--aai-resources/src/main/resources/aaf/permissions.properties2
-rw-r--r--aai-resources/src/main/resources/cadi.properties8
-rw-r--r--aai-resources/src/main/resources/logback.xml13
-rw-r--r--aai-resources/src/test/java/org/onap/aai/it/performance/K6ReadTest.java11
-rw-r--r--aai-resources/src/test/resources/k6/readWithoutRelations.js6
-rw-r--r--aai-resources/src/test/resources/k6/writeWithoutRelations.js4
-rw-r--r--aai-resources/src/test/resources/logback.xml9
13 files changed, 25 insertions, 127 deletions
diff --git a/aai-resources/src/main/resources/aaf/onap/bath_config.csv b/aai-resources/src/main/resources/aaf/onap/bath_config.csv
deleted file mode 100644
index 433b333..0000000
--- a/aai-resources/src/main/resources/aaf/onap/bath_config.csv
+++ /dev/null
@@ -1,32 +0,0 @@
-# AAI -> aai@aai.onap.org
-Basic QUFJOkFBSQ==,Basic YWFpQGFhaS5vbmFwLm9yZzpkZW1vMTIzNDU2IQ==,2050-03-03
-
-# ModelLoader -> aai@aai.onap.org
-Basic TW9kZWxMb2FkZXI6TW9kZWxMb2FkZXI=,Basic YWFpQGFhaS5vbmFwLm9yZzpkZW1vMTIzNDU2IQ==,2050-03-03
-
-# AaiUI -> aai@aai.onap.org,
-Basic QWFpVUk6QWFpVUk=,Basic YWFpQGFhaS5vbmFwLm9yZzpkZW1vMTIzNDU2IQ==,2050-03-03
-
-# MSO -> so@so.onap.org
-Basic TVNPOk1TTw==,Basic c29Ac28ub25hcC5vcmc6ZGVtbzEyMzQ1NiE=,2050-03-03
-
-# SDNC -> sdnc@sdnc.onap.org
-Basic U0ROQzpTRE5D,Basic c2RuY0BzZG5jLm9uYXAub3JnOmRlbW8xMjM0NTYh,2050-03-03
-
-# DCAE -> dcae@dcae.onap.org
-Basic RENBRTpEQ0FF,Basic ZGNhZUBkY2FlLm9uYXAub3JnOmRlbW8xMjMzNDU2IQ==,2050-03-03
-
-# POLICY -> policy@policy.onap.org
-Basic UE9MSUNZOlBPTElDWQ==,Basic cG9saWN5QHBvbGljeS5vbmFwLm9yZzpkZW1vMTIzNDU2IQ==,2050-03-03
-
-# ASDC -> sdc@sdc.onap.org
-Basic QVNEQzpBU0RD,Basic c2RjQHNkYy5vbmFwLm9yZzpkZW1vMTIzNDU2IQ==,2050-03-03
-
-# VID -> vid@vid.onap.org
-Basic VklEOlZJRA==,Basic dmlkQHZpZC5vbmFwLm9yZzpkZW1vMTIzNDU2IQ==,2050-03-03
-
-# APPC -> appc@appc.onap.org
-Basic QVBQQzpBUFBD,Basic YXBwY0BhcHBjLm9uYXAub3JnOmRlbW8xMjM0NTYh,2050-03-03
-
-# OOF -> oof@oof.onap.org
-Basic T09GOk9PRg==,Basic b29mQG9vZi5vbmFwLm9yZzpkZW1vMTIzNDQ2IQ==,2050-03-03
diff --git a/aai-resources/src/main/resources/aaf/onap/org.onap.aai.keyfile b/aai-resources/src/main/resources/aaf/onap/org.onap.aai.keyfile
deleted file mode 100644
index 3416d4a..0000000
--- a/aai-resources/src/main/resources/aaf/onap/org.onap.aai.keyfile
+++ /dev/null
@@ -1,27 +0,0 @@
-2otP92kNFHdexroZxvgYY7ffslFiwCD3CiVYMIfUF2edqZK7972NwkvE_mbaBo6jh8lByLIqrWAf
-jyzoiVsvQ_kCa0cS1xaRLpcxv3bx1b7o3hGPBqpd6vmSG4y2JLzNlCBZWuTJz827wr8p_fWrYuUm
-4L1WoaEe8W5PRnXjl4hDqbJBAlEoRIBXugUDt_7O5wgx2Rl3HVoOczZtf0RzONZ1F0BmKf3QlAUe
-moSbARitYRgIPt5sLbT7qPyoEpGDhQ1XBowR744-wsjBc-14yO62Ajp5xWKTp15uWn3_HHuw1SAf
-GWSBRGlSlEVkXQqi9Hw5jDttKVzHX1ckwR0SQOirbtHPHplxPX3WKjKhSdSeMzw6LOAHIQYRMKBT
-74oGnULAfPtV7TaGwOKriT3P49CoPdt9On89-LGyCZSxDWKH0K-rgB6I2_hPT2Uzr3jmXiMa-sfh
-iMvyQ7ABBVx0OFsUuNb5mcU2O6dWiQreL5RerrloV_X3ZtnNjxENXKjQ5KBR1A5ISPjFFK-kf4Rb
-p6FSII8LcsiqgdWuZ4GX_C6x8HX4A-vD0x3Uc9CfoXY-k23cNIy-R-W-oB-P2OgdWDNgZ7VaOLNt
-3L-NwWpNblfYvs93cNmkbVAwCZ3r0OP7RFeuON84TRaynK_Fh2S3rypRyJcUmM1pvpZqJ5_-umSW
-hUs1OqkdLv3xjlVzzK-3nMr0q3Zcyp4XdyLYtcX5I3Xqk9ZcsyAT7ghmHhV8KjUjue7OcfAWg0m7
-RJLGq6VC8HeK4HEMa4lF677Qh7DRufghIDEmQSIDfGA790WGSA8HqcOvAL4hURCHyCWiPa5i8ksX
-xX4HyqF8PCVCLJ_ZhzcuIlc0jStAexWbJU_vcyX7XgUaHCkF-M-zv1FP6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sc_P562Diu_pcdt-r55pMFQYGoGfjRmxQBKk0-SsdnP
-mlZIiis9DfQEN0q3QQdNRYBJD7tmhUwhAPZdLgXqJA8sZf8UyFQhhpsky79NT343YL9smUlF \ No newline at end of file
diff --git a/aai-resources/src/main/resources/aaf/onap/org.onap.aai.p12 b/aai-resources/src/main/resources/aaf/onap/org.onap.aai.p12
deleted file mode 100644
index 023e2ea..0000000
--- a/aai-resources/src/main/resources/aaf/onap/org.onap.aai.p12
+++ /dev/null
Binary files differ
diff --git a/aai-resources/src/main/resources/aaf/onap/org.onap.aai.props b/aai-resources/src/main/resources/aaf/onap/org.onap.aai.props
deleted file mode 100644
index 33f0f3c..0000000
--- a/aai-resources/src/main/resources/aaf/onap/org.onap.aai.props
+++ /dev/null
@@ -1,14 +0,0 @@
-############################################################
-# Properties Generated by AT&T Certificate Manager
-# @copyright 2016, AT&T
-############################################################
-cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US
-cadi_keyfile=aai-resources/src/main/resources/aaf/onap/org.onap.aai.keyfile
-cadi_keystore=aai-resources/src/main/resources/aaf/onap/org.onap.aai.p12
-cadi_keystore_password=enc:383RDJRFA6yQz9AOxUxC1iIg3xTJXityw05MswnpnEtelRQy2D4r5INQjrea7GTV
-#cadi_key_password=enc:<KEY PASSWORD (optional if the same as KEYSTORE PASSWORD)>
-cadi_alias=aai@aai.onap.org
-cadi_truststore=aai-resources/src/main/resources/aaf/onap/truststoreONAPall.jks
-cadi_truststore_password=enc:s77wlnZFoQ08NhnU3OSeWO6uKgRwC6sAK-wTvVubNz2
-cadi_loglevel=INFO
-cadi_bath_convert=aai-resources/src/main/resources/aaf/onap/bath_config.csv
diff --git a/aai-resources/src/main/resources/aaf/onap/org.osaaf.location.props b/aai-resources/src/main/resources/aaf/onap/org.osaaf.location.props
deleted file mode 100644
index 73a3a1e..0000000
--- a/aai-resources/src/main/resources/aaf/onap/org.osaaf.location.props
+++ /dev/null
@@ -1,26 +0,0 @@
-##
-## org.osaaf.location.props
-##
-## Localized Machine Information
-##
-# Almeda California ?
-cadi_latitude=37.78187
-cadi_longitude=-122.26147
-
-# Locate URL (which AAF Env)
-#aaf_locate_url=https://aaf-onap-beijing-test.osaaf.org
-#aaf_locate_url=https://aaf-onap-test.osaaf.org
-
-aaf_locate_url=https://aaf-onap-test.osaaf.org:8095
-
-# AAF URL
-aaf_url=https://AAF_LOCATE_URL/AAF_NS.service:2.0
-
-# AAF Environment Designation
-aaf_env=DEV
-
-# OAuth2 Endpoints
-aaf_oauth2_token_url=https://AAF_LOCATE_URL/AAF_NS.token:2.0/token
-aaf_oauth2_introspect_url=https://AAF_LOCATE_URL/AAF_NS.introspect:2.0/introspect
-
-
diff --git a/aai-resources/src/main/resources/aaf/onap/truststoreONAPall.jks b/aai-resources/src/main/resources/aaf/onap/truststoreONAPall.jks
deleted file mode 100644
index 2da1dcc..0000000
--- a/aai-resources/src/main/resources/aaf/onap/truststoreONAPall.jks
+++ /dev/null
Binary files differ
diff --git a/aai-resources/src/main/resources/aaf/permissions.properties b/aai-resources/src/main/resources/aaf/permissions.properties
deleted file mode 100644
index 4234121..0000000
--- a/aai-resources/src/main/resources/aaf/permissions.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-permission.type=org.onap.aai.resources
-permission.instance=* \ No newline at end of file
diff --git a/aai-resources/src/main/resources/cadi.properties b/aai-resources/src/main/resources/cadi.properties
deleted file mode 100644
index 24d46d5..0000000
--- a/aai-resources/src/main/resources/cadi.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-
-cadi_loglevel=INFO
-cadi_prop_files=aai-resources/src/main/resources/aaf/onap/org.osaaf.location.props:aai-resources/src/main/resources/aaf/onap/org.onap.aai.props
-
-# OAuth2
-aaf_oauth2_token_url=https://AAF_LOCATE_URL/AAF_NS.token:2.0/token
-aaf_oauth2_introspect_url=https://AAF_LOCATE_URL/AAF_NS.introspect:2.0/introspect
-
diff --git a/aai-resources/src/main/resources/logback.xml b/aai-resources/src/main/resources/logback.xml
index 2b8791a..e8314e7 100644
--- a/aai-resources/src/main/resources/logback.xml
+++ b/aai-resources/src/main/resources/logback.xml
@@ -134,7 +134,7 @@
<pattern>${transLogPattern}</pattern>
</encoder>
</appender>
-
+
<appender name="asynctranslog" class="ch.qos.logback.classic.AsyncAppender">
<queueSize>${queueSize}</queueSize>
<includeCallerData>true</includeCallerData>
@@ -264,7 +264,7 @@
<logger name="org.zookeeper" level="OFF" />
- <logger name="org.onap.aai" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai" level="INFO" additivity="false">
<appender-ref ref="asyncDEBUG" />
<appender-ref ref="asyncSANE" />
<appender-ref ref="STDOUT" />
@@ -275,7 +275,10 @@
<logger name="org.onap.aai.aailog.logs.AaiScheduledTaskAuditLog" level="INFO">
<appender-ref ref="asyncAUDIT"/>
</logger>
- <logger name="org.onap.logging.filter.base.AbstractAuditLogFilter" level="INFO">
+ <logger name="org.onap.logging.filter.base.AbstractAuditLogFilter" level="WARN">
+ <appender-ref ref="asyncAUDIT"/>
+ </logger>
+ <logger name="org.onap.logging.filter.base.MDCSetup" level="WARN">
<appender-ref ref="asyncAUDIT"/>
</logger>
<logger name="org.onap.aai.aailog.logs.AaiDBMetricLog" level="INFO">
@@ -287,7 +290,7 @@
<logger name="org.onap.aai.logging.ErrorLogHelper" level="WARN">
<appender-ref ref="asyncERROR"/>
</logger>
- <logger name="org.onap.aai.interceptors.post" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai.interceptors.post" level="WARN" additivity="false">
<appender-ref ref="asynctranslog" />
</logger>
@@ -300,7 +303,7 @@
<appender-ref ref="kafkaAAIEventConsumerInfo" />
</logger>
- <root level="DEBUG">
+ <root level="INFO">
<appender-ref ref="external" />
<appender-ref ref="STDOUT" />
</root>
diff --git a/aai-resources/src/test/java/org/onap/aai/it/performance/K6ReadTest.java b/aai-resources/src/test/java/org/onap/aai/it/performance/K6ReadTest.java
index 0dee841..f176ccc 100644
--- a/aai-resources/src/test/java/org/onap/aai/it/performance/K6ReadTest.java
+++ b/aai-resources/src/test/java/org/onap/aai/it/performance/K6ReadTest.java
@@ -110,11 +110,12 @@ public class K6ReadTest {
logger.error(container.getLogs());
}
- logger.debug(container.getLogs());
- assertThat(container.getLogs(), containsString("✓ status was 200"));
- assertThat(container.getLogs(), containsString("✓ returned correct number of results"));
- assertThat(container.getLogs(), containsString("✓ http_req_duration"));
- assertThat(container.getLogs(), containsString("✓ http_req_failed"));
+ String report = container.getLogs();
+ logger.info(report);
+ assertThat(report, containsString("✓ status was 200"));
+ assertThat(report, containsString("✓ returned correct number of results"));
+ assertThat(report, containsString("✓ http_req_duration"));
+ assertThat(report, containsString("✓ http_req_failed"));
container.stop();
}
diff --git a/aai-resources/src/test/resources/k6/readWithoutRelations.js b/aai-resources/src/test/resources/k6/readWithoutRelations.js
index 8e55214..da486fa 100644
--- a/aai-resources/src/test/resources/k6/readWithoutRelations.js
+++ b/aai-resources/src/test/resources/k6/readWithoutRelations.js
@@ -22,7 +22,7 @@ import { check } from "k6";
export const options = {
vus: 3,
- duration: `${__ENV.DURATION_SECONDS}s`,
+ duration: `${__ENV.DURATION_SECONDS || 10}s`,
thresholds: {
http_req_failed: ["rate<0.01"], // http errors should be less than 1%
http_req_duration: [
@@ -46,8 +46,8 @@ export default function () {
"X-TransactionId": "someTransaction",
},
};
- const pserverCount = parseInt(`${__ENV.N_PSERVERS}`, 10);
- const baseUrl = `http://localhost:${__ENV.API_PORT}/aai/${__ENV.API_VERSION}`;
+ const pserverCount = parseInt(`${__ENV.N_PSERVERS || 100000}`, 10);
+ const baseUrl = `http://localhost:${__ENV.API_PORT || 8447}/aai/${__ENV.API_VERSION || 'v29'}`;
const url = `/cloud-infrastructure/pservers`;
const res = http.get(baseUrl + url, options);
diff --git a/aai-resources/src/test/resources/k6/writeWithoutRelations.js b/aai-resources/src/test/resources/k6/writeWithoutRelations.js
index bb4b839..1201020 100644
--- a/aai-resources/src/test/resources/k6/writeWithoutRelations.js
+++ b/aai-resources/src/test/resources/k6/writeWithoutRelations.js
@@ -23,7 +23,7 @@ import { randomIntBetween } from 'https://jslib.k6.io/k6-utils/1.3.0/index.js';
export const options = {
vus: 3,
- duration: `${__ENV.DURATION_SECONDS}s`,
+ duration: `${__ENV.DURATION_SECONDS || 10}s`,
thresholds: {
http_req_failed: ["rate<0.01"], // http errors should be less than 1%
http_req_duration: [
@@ -68,7 +68,7 @@ function generatePServer(someInt) {
});
}
-const baseUrl = `http://localhost:${__ENV.API_PORT}/aai/${__ENV.API_VERSION}`;
+const baseUrl = `http://localhost:${__ENV.API_PORT || 8447}/aai/${__ENV.API_VERSION || 'v29'}`;
const path = `/cloud-infrastructure/pservers/pserver`;
const url = baseUrl + path;
const encodedCredentials = 'QUFJOkFBSQ==';
diff --git a/aai-resources/src/test/resources/logback.xml b/aai-resources/src/test/resources/logback.xml
index 80050ca..d8a5020 100644
--- a/aai-resources/src/test/resources/logback.xml
+++ b/aai-resources/src/test/resources/logback.xml
@@ -234,16 +234,19 @@
<logger name="org.onap.aai.aailog.logs.AaiScheduledTaskAuditLog" level="INFO">
<appender-ref ref="asyncAUDIT"/>
</logger>
- <logger name="org.onap.logging.filter.base.AbstractAuditLogFilter" level="INFO">
+ <logger name="org.onap.logging.filter.base.AbstractAuditLogFilter" level="WARN">
<appender-ref ref="asyncAUDIT"/>
</logger>
- <logger name="org.onap.aai.aailog.logs.AaiDBMetricLog" level="INFO">
+ <logger name="org.onap.logging.filter.base.MDCSetup" level="WARN">
+ <appender-ref ref="asyncAUDIT"/>
+ </logger>
+ <logger name="org.onap.aai.aailog.logs.AaiDBMetricLog" level="WARN">
<appender-ref ref="asyncMETRIC"/>
</logger>
<logger name="org.onap.aai.logging.ErrorLogHelper" level="WARN">
<appender-ref ref="asyncERROR"/>
</logger>
- <logger name="org.onap.aai.interceptors.post" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai.interceptors.post" level="WARN" additivity="false">
<appender-ref ref="asynctranslog" />
</logger>