-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Truncate pre-delete-controller Job name to 63 characters #506
Changes from 5 commits
f95e10d
93ae341
61b77f2
5fabe07
743b1b3
d51cefc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -691,3 +691,30 @@ load _helpers | |
local actual=$(echo "$object" | yq '.[4]' | tee /dev/stderr) | ||
[ "${actual}" = "--bar=qux" ] | ||
} | ||
|
||
|
||
#-------------------------------------------------------------------- | ||
# pre-delete-controller | ||
|
||
@test "controller/Deployment: pre-delete-controller Job name is not truncated by default" { | ||
cd `chart_dir` | ||
local object=$(helm template \ | ||
-s templates/deployment.yaml \ | ||
. | tee /dev/stderr | | ||
yq 'select(.kind == "Job") | .metadata' | tee /dev/stderr) | ||
|
||
local actual=$(echo "$object" | yq '.name' | tee /dev/stderr) | ||
[ "${actual}" = "pdcc-release-name-vault-secrets-operator" ] | ||
} | ||
|
||
@test "controller/Deployment: pre-delete-controller Job name is truncated to 63 characters" { | ||
cd `chart_dir` | ||
local object=$(helm template \ | ||
-s templates/deployment.yaml \ | ||
--set fullnameOverride=abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz \ | ||
. | tee /dev/stderr | | ||
yq 'select(.kind == "Job") | .metadata' | tee /dev/stderr) | ||
|
||
local actual=$(echo "$object" | yq '.name' | tee /dev/stderr) | ||
[ "${actual}" = "pdcc-abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdef" ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cool, I wonder if we could also assert the length of Something like: [ "${#actual}" -eq 63 ] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oooo, nice! thx, have included it in d51cefc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: extra leading whitespace There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fixed in d51cefc |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra leading whitespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in d51cefc