diff --git a/.github/actions/setup-umbrella-env/action.yaml b/.github/actions/setup-umbrella-env/action.yaml index f474953c0..b09735986 100644 --- a/.github/actions/setup-umbrella-env/action.yaml +++ b/.github/actions/setup-umbrella-env/action.yaml @@ -122,7 +122,6 @@ runs: kubectl port-forward svc/umbrella-dataprovider-submodelserver 9999:8080 --namespace e2e-testing & shell: bash - - name: Setup test data run: | chmod +x ./local/testing/testdata/upload-testdata.sh @@ -133,6 +132,12 @@ runs: "http://umbrella-dataprovider-edc-dataplane:8081" shell: bash + - name: Prepare expected files + run: | + chmod +x ./local/testing/testdata/prepare-expected-files.sh + ./local/testing/testdata/prepare-expected-files.sh "BPNL00000003AYRE" + shell: bash + - name: Wait for deployment id: deployment-ready shell: bash diff --git a/local/testing/testdata/prepare-expected-files.sh b/local/testing/testdata/prepare-expected-files.sh new file mode 100644 index 000000000..7b271ffcf --- /dev/null +++ b/local/testing/testdata/prepare-expected-files.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +PROVIDER_BPN=$1 + +bpn_regex_pattern='(BPN)(L|S|A)([a-zA-Z0-9]{12})' +replacement=$PROVIDER_BPN +directory="irs-cucumber-tests/src/test/resources/expected-files" + +# Iterate over all files in the directory +for file in "$directory"/*; do + # Check if the file is a regular file + if [ -f "$file" ]; then + # Use sed to replace the pattern and overwrite the file + sed -i -E "s/$bpn_regex_pattern/$replacement/g" "$file" + echo "Processed: $file" + fi +done \ No newline at end of file