Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
user-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OZG-Cloud
app
user-manager
Commits
76c3d6e7
Commit
76c3d6e7
authored
1 year ago
by
OZGCloud
Browse files
Options
Downloads
Patches
Plain Diff
OZG-4884-Change bezeichner maximal length to 46 and add helm unittest
parent
174bdcbf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/helm/templates/_helpers.tpl
+2
-2
2 additions, 2 deletions
src/main/helm/templates/_helpers.tpl
src/test/helm/deployment_realm_name_length_test.yaml
+42
-0
42 additions, 0 deletions
src/test/helm/deployment_realm_name_length_test.yaml
with
44 additions
and
2 deletions
src/main/helm/templates/_helpers.tpl
+
2
−
2
View file @
76c3d6e7
...
@@ -72,8 +72,8 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
...
@@ -72,8 +72,8 @@ app.kubernetes.io/namespace: {{ include "app.namespace" . }}
{{- if (.Values.ozgcloud).bezeichner -}}
{{- if (.Values.ozgcloud).bezeichner -}}
{{ $length := len (.Values.ozgcloud).bezeichner }}
{{ $length := len (.Values.ozgcloud).bezeichner }}
{{- if lt
27
$length -}}
{{- if lt
46
$length -}}
{{ required (printf "Bezeichner %s ist zu lang (max.
27
Zeichen)" (.Values.ozgcloud).bezeichner) nil }}
{{ required (printf "Bezeichner %s ist zu lang (max.
46
Zeichen)" (.Values.ozgcloud).bezeichner) nil }}
{{- else -}}
{{- else -}}
{{- required "Bezeichner muss angegeben sein" (.Values.ozgcloud).bezeichner -}}
{{- required "Bezeichner muss angegeben sein" (.Values.ozgcloud).bezeichner -}}
{{- end -}}
{{- end -}}
...
...
This diff is collapsed.
Click to expand it.
src/test/helm/deployment_realm_name_length_test.yaml
0 → 100644
+
42
−
0
View file @
76c3d6e7
#
# Copyright (C) 2022 Das Land Schleswig-Holstein vertreten durch den
# Ministerpräsidenten des Landes Schleswig-Holstein
# Staatskanzlei
# Abteilung Digitalisierung und zentrales IT-Management der Landesregierung
#
# Lizenziert unter der EUPL, Version 1.2 oder - sobald
# diese von der Europäischen Kommission genehmigt wurden -
# Folgeversionen der EUPL ("Lizenz");
# Sie dürfen dieses Werk ausschließlich gemäß
# dieser Lizenz nutzen.
# Eine Kopie der Lizenz finden Sie hier:
#
# https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
#
# Sofern nicht durch anwendbare Rechtsvorschriften
# gefordert oder in schriftlicher Form vereinbart, wird
# die unter der Lizenz verbreitete Software "so wie sie
# ist", OHNE JEGLICHE GEWÄHRLEISTUNG ODER BEDINGUNGEN -
# ausdrücklich oder stillschweigend - verbreitet.
# Die sprachspezifischen Genehmigungen und Beschränkungen
# unter der Lizenz sind dem Lizenztext zu entnehmen.
#
suite
:
test ozgcloud bezeichner length
release
:
name
:
user-manager
namespace
:
sh-helm-test
templates
:
-
templates/deployment.yaml
tests
:
-
it
:
should fail on bezeichner length longer than 46 characters
template
:
deployment.yaml
set
:
ozgcloud
:
bezeichner
:
test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890
environment
:
test
bundesland
:
by
asserts
:
-
failedTemplate
:
errorMessage
:
Bezeichner test1234567890123123456789012345678901234567890123456789012345678901234567890123456789012345678904567890 ist zu lang (max. 46 Zeichen)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment