blob: c1c744e091f6a5c93b83181420919ecc3826eb06 [file] [log] [blame]
BjornMagnussonXA70e878f2020-05-11 14:11:30 +02001#!/bin/bash
2
3# ============LICENSE_START===============================================
4# Copyright (C) 2020 Nordix Foundation. All rights reserved.
5# ========================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17# ============LICENSE_END=================================================
18#
19
20
21TC_ONELINE_DESCR="Testing of service registration timeouts and keepalive"
22
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010023#App names to include in the test when running docker, space separated list
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010024DOCKER_INCLUDED_IMAGES="CBS CONSUL CP CR MR A1PMS RICSIM NGW KUBEPROXY"
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +020025
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010026#App names to include in the test when running kubernetes, space separated list
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010027KUBE_INCLUDED_IMAGES="CP CR MR A1PMS RICSIM KUBEPROXY NGW"
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010028#Prestarted app (not started by script) to include in the test when running kubernetes, space separated list
29KUBE_PRESTARTED_IMAGES=""
30
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010031#Ignore image in DOCKER_INCLUDED_IMAGES, KUBE_INCLUDED_IMAGES if
32#the image is not configured in the supplied env_file
33#Used for images not applicable to all supported profile
BjornMagnussonXA8fbb2262022-01-24 15:20:15 +010034CONDITIONALLY_IGNORED_IMAGES="CBS CONSUL NGW"
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010035
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010036#Supported test environment profiles
BjornMagnussonXAe60d04e2021-12-27 13:38:01 +010037SUPPORTED_PROFILES="ONAP-GUILIN ONAP-HONOLULU ONAP-ISTANBUL ONAP-JAKARTA ORAN-CHERRY ORAN-D-RELEASE ORAN-E-RELEASE ORAN-F-RELEASE"
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010038#Supported run modes
39SUPPORTED_RUNMODES="DOCKER KUBE"
BjornMagnussonXA49f0e5a2020-11-08 22:41:39 +010040
BjornMagnussonXA79e37002021-11-22 13:36:04 +010041. ../common/testcase_common.sh $@
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020042
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010043setup_testenvironment
44
45#### TEST BEGIN ####
46
47generate_policy_uuid
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020048
BjornMagnussonXA496156d2020-08-10 14:16:24 +020049use_cr_http
BjornMagnussonXAbf3700b2020-10-05 08:39:40 +020050use_simulator_http
51use_mr_http
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010052use_a1pms_rest_http
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020053
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010054clean_environment
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020055
BjornMagnussonXA663566c2021-11-08 10:25:07 +010056start_kube_proxy
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010057
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020058start_ric_simulators ricsim_g1 1 OSC_2.1.0
BjornMagnussonXA4207b832020-11-03 09:52:49 +010059start_ric_simulators ricsim_g2 1 STD_1.1.3
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010060if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA4207b832020-11-03 09:52:49 +010061 start_ric_simulators ricsim_g3 1 STD_2.0.0
62fi
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020063
64start_mr
65
BjornMagnussonXA79e37002021-11-22 13:36:04 +010066start_cr 1
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020067
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010068start_control_panel $SIM_GROUP/$CONTROL_PANEL_COMPOSE_DIR/$CONTROL_PANEL_CONFIG_FILE
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010069
BjornMagnussonXAbe9a07f2021-02-25 10:51:46 +010070if [ ! -z "$NRT_GATEWAY_APP_NAME" ]; then
71 start_gateway $SIM_GROUP/$NRT_GATEWAY_COMPOSE_DIR/$NRT_GATEWAY_CONFIG_FILE
72fi
73
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010074start_a1pms NORPOXY $SIM_GROUP/$A1PMS_COMPOSE_DIR/$A1PMS_CONFIG_FILE
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020075
76prepare_consul_config NOSDNC ".consul_config.json"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020077
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010078if [ $RUNMODE == "KUBE" ]; then
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010079 a1pms_load_config ".consul_config.json"
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010080else
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010081 if [[ "$A1PMS_FEATURE_LEVEL" == *"NOCONSUL"* ]]; then
82 a1pms_api_put_configuration 200 ".consul_config.json"
BjornMagnussonXA8fbb2262022-01-24 15:20:15 +010083 else
84 start_consul_cbs
85 consul_config_app ".consul_config.json"
86 fi
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +010087fi
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020088
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010089set_a1pms_debug
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020090
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020091mr_equal requests_submitted 0
92
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010093#Check a1pms alive
94a1pms_api_get_status 200
BjornMagnussonXA70e878f2020-05-11 14:11:30 +020095
96#Print simulator interface version
97sim_print ricsim_g1_1 interface
BjornMagnussonXA4207b832020-11-03 09:52:49 +010098sim_print ricsim_g2_1 interface
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +010099if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100100 sim_print ricsim_g3_1 interface
101fi
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200102
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100103a1pms_api_put_service 201 "service1" 15 "$CR_SERVICE_APP_PATH_0/service1"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200104
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100105a1pms_api_get_services 200 "service1" "service1" 15 "$CR_SERVICE_APP_PATH_0/service1"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200106
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100107a1pms_api_put_service 201 "service2" 120 "$CR_SERVICE_APP_PATH_0/service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200108
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100109a1pms_api_get_services 200 "service2" "service2" 120 "$CR_SERVICE_APP_PATH_0/service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200110
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100111a1pms_api_put_service 200 "service1" 50 "$CR_SERVICE_APP_PATH_0/service1"
112a1pms_api_put_service 200 "service2" 180 "$CR_SERVICE_APP_PATH_0/service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200113
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100114a1pms_api_get_services 200 "service1" "service1" 50 "$CR_SERVICE_APP_PATH_0/service1"
115a1pms_api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200116
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100117a1pms_api_get_service_ids 200 "service1" "service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200118
119sleep_wait 30 "Waiting for keep alive timeout"
120
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100121a1pms_api_get_services 200 "service1" "service1" 50 "$CR_SERVICE_APP_PATH_0/service1"
122a1pms_api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200123
124sleep_wait 100 "Waiting for keep alive timeout"
125
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100126a1pms_api_get_services 404 "service1"
127a1pms_api_get_services 200 "service2" "service2" 180 "$CR_SERVICE_APP_PATH_0/service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200128
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100129a1pms_api_delete_services 204 "service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200130
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100131a1pms_api_get_services 404 "service1"
132a1pms_api_get_services 404 "service2"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200133
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100134a1pms_api_put_service 201 "service3" 60 "$CR_SERVICE_APP_PATH_0/service3"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200135
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100136a1pms_api_get_services 200 "service3" "service3" 60 "$CR_SERVICE_APP_PATH_0/service3"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200137
138sleep_wait 30 "Waiting for keep alive timeout"
139
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100140a1pms_api_put_service 200 "service3" 60 "$CR_SERVICE_APP_PATH_0/service3"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200141
142sleep_wait 100 "Waiting for keep alive timeout"
143
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100144a1pms_api_get_services 404 "service3"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200145
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100146a1pms_api_put_service 201 "service4" 120 "$CR_SERVICE_APP_PATH_0/service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200147
148sleep_wait 60 "Waiting for keep alive timeout"
149
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100150a1pms_api_get_services 200 "service4" "service4" 120 "$CR_SERVICE_APP_PATH_0/service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200151
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100152a1pms_api_put_services_keepalive 200 "service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200153
154sleep_wait 90 "Waiting for keep alive timeout"
155
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100156a1pms_api_get_services 200 "service4" "service4" 120 "$CR_SERVICE_APP_PATH_0/service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200157
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100158a1pms_api_delete_services 204 "service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200159
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100160a1pms_api_get_services 404 "service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200161
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100162a1pms_api_get_services 404 "service1"
163a1pms_api_get_services 404 "service2"
164a1pms_api_get_services 404 "service3"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200165
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100166a1pms_api_get_service_ids 200
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200167
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100168a1pms_api_delete_services 404 "service1"
169a1pms_api_delete_services 404 "service2"
170a1pms_api_delete_services 404 "service3"
171a1pms_api_delete_services 404 "service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200172
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100173a1pms_api_put_services_keepalive 404 "service1"
174a1pms_api_put_services_keepalive 404 "service2"
175a1pms_api_put_services_keepalive 404 "service3"
176a1pms_api_put_services_keepalive 404 "service4"
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200177
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200178# Policy delete after timeout
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100179a1pms_api_put_service 201 "service10" 600 "$CR_SERVICE_APP_PATH_0/service10"
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200180
181sim_put_policy_type 201 ricsim_g1_1 1 testdata/OSC/sim_1.json
182
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100183if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100184
185 sim_put_policy_type 201 ricsim_g3_1 STD_QOS2_0.1.0 testdata/STD2/sim_qos2.json
186
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100187 a1pms_equal json:rics 3 300
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200188
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100189 #a1pms_equal json:policy_schemas 2 120
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200190
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100191 a1pms_equal json:policy-types 3 120
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200192
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100193 a1pms_equal json:policies 0
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100194else
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100195 a1pms_equal json:rics 2 300
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200196
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100197 a1pms_equal json:policy_schemas 2 120
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200198
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100199 a1pms_equal json:policy_types 2
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200200
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100201 a1pms_equal json:policies 0
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100202fi
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200203
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100204if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA79e37002021-11-22 13:36:04 +0100205 notificationurl=$CR_SERVICE_APP_PATH_0"/test"
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100206else
207 notificationurl=""
208fi
209
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100210a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5000 NOTRANSIENT $notificationurl testdata/OSC/pi1_template.json
211a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5100 NOTRANSIENT $notificationurl testdata/STD/pi1_template.json
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200212
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100213if [ "$A1PMS_VERSION" == "V2" ]; then
214 a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5200 NOTRANSIENT $notificationurl testdata/STD2/pi_qos2_template.json
215 a1pms_equal json:policies 3
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100216else
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100217 a1pms_equal json:policies 2
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100218fi
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200219
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100220sim_equal ricsim_g1_1 num_instances 1
221sim_equal ricsim_g2_1 num_instances 1
222
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100223a1pms_api_put_policy 201 "service10" ricsim_g1_1 1 5001 true $notificationurl testdata/OSC/pi1_template.json
224a1pms_api_put_policy 201 "service10" ricsim_g2_1 NOTYPE 5101 true $notificationurl testdata/STD/pi1_template.json
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100225
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100226if [ "$A1PMS_VERSION" == "V2" ]; then
227 a1pms_api_put_policy 201 "service10" ricsim_g3_1 STD_QOS2_0.1.0 5201 true $notificationurl testdata/STD2/pi_qos2_template.json
228 a1pms_equal json:policies 6
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100229else
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100230 a1pms_equal json:policies 4
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100231fi
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100232
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200233sim_equal ricsim_g1_1 num_instances 2
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100234sim_equal ricsim_g2_1 num_instances 2
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100235if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100236 sim_equal ricsim_g3_1 num_instances 2
237fi
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200238
239sim_post_delete_instances 200 ricsim_g1_1
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100240sim_post_delete_instances 200 ricsim_g2_1
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200241
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100242if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100243 sim_post_delete_instances 200 ricsim_g3_1
244fi
245
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200246#Wait for recreate of non transient policy
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100247if [ "$A1PMS_VERSION" == "V2" ]; then
248 a1pms_equal json:policies 3 180
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100249else
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100250 a1pms_equal json:policies 2 180
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100251fi
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200252
253sim_equal ricsim_g1_1 num_instances 1
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100254sim_equal ricsim_g2_1 num_instances 1
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100255if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100256 sim_equal ricsim_g3_1 num_instances 1
257fi
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200258
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100259a1pms_api_put_service 200 "service10" 10 "$CR_SERVICE_APP_PATH_0/service10"
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200260
261#Wait for service expiry
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100262a1pms_equal json:policies 0 120
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200263
264sim_equal ricsim_g1_1 num_instances 0
BjornMagnussonXA4207b832020-11-03 09:52:49 +0100265sim_equal ricsim_g2_1 num_instances 0
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100266if [ "$A1PMS_VERSION" == "V2" ]; then
BjornMagnussonXA2791e082020-11-12 00:52:08 +0100267 sim_equal ricsim_g3_1 num_instances 0
268fi
BjornMagnussonXAbbd2e9d2020-05-27 21:24:06 +0200269
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100270a1pms_api_get_service_ids 200
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200271
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200272mr_equal requests_submitted 0
273
BjornMagnussonXAd2aeca82022-03-07 11:04:55 +0100274check_a1pms_logs
BjornMagnussonXA70e878f2020-05-11 14:11:30 +0200275
276#### TEST COMPLETE ####
277
278store_logs END
279
280print_result
281
BjornMagnussonXAe0b665e2021-01-08 22:19:18 +0100282auto_clean_environment