Skip to content

Commit

Permalink
chore(testdata):[#226] revert bpn change in expected files
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-jhartmann committed Jul 25, 2024
1 parent 8f77466 commit 4a86256
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/setup-umbrella-env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
36 changes: 36 additions & 0 deletions local/testing/testdata/prepare-expected-files.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4a86256

Please sign in to comment.