-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use new BPN Policy in artefacts and E2E tests (#690)
* feat: use new BPN Policy in artefacts and E2E tests * moved old code to the new module * add README.md * update helm charts, extend helm tests * update helm tests * unrelated: clean out old files * use mgmt api as helm test * fix datasource in azure chart
- Loading branch information
1 parent
4ab0ced
commit e03e4ad
Showing
52 changed files
with
706 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
charts/tractusx-connector-azure-vault/templates/tests/test-controlplane.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# | ||
# Copyright (c) 2023 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 | ||
# | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "{{include "txdc.fullname" .}}-test-controlplane" | ||
labels: | ||
{{- include "txdc.controlplane.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
"helm.sh/hook-delete-policy": {{ .Values.tests.hookDeletePolicy }} | ||
spec: | ||
containers: | ||
{{/* Poke the pod's management API */}} | ||
- name: readiness | ||
image: curlimages/curl | ||
command: [ 'curl', '--fail' ] | ||
args: [ '{{- printf "http://%s-controlplane:%v%s/check/readiness" (include "txdc.fullname" $ ) $.Values.controlplane.endpoints.default.port $.Values.controlplane.endpoints.default.path -}}' ] | ||
|
||
{{/* Try adding a BPN Group to the store via the management API */}} | ||
- name: mgmt-api-bpn-store | ||
image: curlimages/curl | ||
command: [ 'curl', '-X', 'POST', '--fail','-H','Content-Type: application/json', '-H', '{{- printf "x-api-key: %s" $.Values.controlplane.endpoints.management.authKey }}', '-d', '{ | ||
"@context": { | ||
"tx": "https://w3id.org/tractusx/v0.0.1/ns/" | ||
}, | ||
"@id": "tx:BPN000001234", | ||
"tx:groups": ["group1", "group2", "group3"] | ||
}' ] | ||
args: [ '{{- printf "http://%s-controlplane:%v%s/business-partner-groups" (include "txdc.fullname" $ ) $.Values.controlplane.endpoints.management.port $.Values.controlplane.endpoints.management.path -}}' ] | ||
restartPolicy: Never | ||
securityContext: | ||
fsGroup: 101 # curl_group | ||
runAsGroup: 101 # curl_group | ||
runAsNonRoot: true | ||
runAsUser: 100 # curl_user | ||
seccompProfile: | ||
type: RuntimeDefault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
charts/tractusx-connector-memory/templates/tests/test-readiness.yaml
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
charts/tractusx-connector-memory/templates/tests/test-runtime.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Copyright (c) 2023 ZF Friedrichshafen AG | ||
# Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH | ||
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
# Copyright (c) 2021, 2023 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 | ||
# | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: "{{ include "txdc.fullname" . }}-test" | ||
labels: | ||
{{- include "txdc.runtime.labels" . | nindent 4 }} | ||
annotations: | ||
"helm.sh/hook": test | ||
"helm.sh/hook-delete-policy": {{ .Values.tests.hookDeletePolicy }} | ||
spec: | ||
containers: | ||
- name: readiness | ||
image: curlimages/curl | ||
command: [ 'curl', '--fail' ] | ||
args: [ '{{- printf "http://%s-runtime:%v%s/check/readiness" (include "txdc.fullname" $ ) $.Values.runtime.endpoints.default.port $.Values.runtime.endpoints.default.path -}}' ] | ||
{{/* Try adding a BPN Group to the store via the management API */}} | ||
- name: mgmt-api-bpn-store | ||
image: curlimages/curl | ||
command: [ 'curl', '-X', 'POST', '--fail','-H','Content-Type: application/json', '-H', '{{- printf "x-api-key: %s" $.Values.runtime.endpoints.management.authKey }}', '-d', '{ | ||
"@context": { | ||
"tx": "https://w3id.org/tractusx/v0.0.1/ns/" | ||
}, | ||
"@id": "tx:BPN000001234", | ||
"tx:groups": ["group1", "group2", "group3"] | ||
}' ] | ||
args: [ '{{- printf "http://%s-runtime:%v%s/business-partner-groups" (include "txdc.fullname" $ ) $.Values.runtime.endpoints.management.port $.Values.runtime.endpoints.management.path -}}' ] | ||
restartPolicy: Never | ||
securityContext: | ||
fsGroup: 101 # curl_group | ||
runAsGroup: 101 # curl_group | ||
runAsNonRoot: true | ||
runAsUser: 100 # curl_user | ||
seccompProfile: | ||
type: RuntimeDefault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 0 additions & 43 deletions
43
charts/tractusx-connector/templates/tests/test-controlplane-readiness.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.