Skip to content
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

Missing custom template name validation #10113

Closed
2 tasks done
jamest-portainer opened this issue Aug 24, 2023 · 0 comments · Fixed by #8760
Closed
2 tasks done

Missing custom template name validation #10113

jamest-portainer opened this issue Aug 24, 2023 · 0 comments · Fixed by #8760
Labels
Milestone

Comments

@jamest-portainer
Copy link

Before you start please confirm the following.

Problem Description

Scenario 1 - Kube Template Create
Given I have a kubernetes environment
When I create a kubernetes custom template
And I add characters, which aren’t valid as a kubernetes label

Expected results
Then I should get a validation error This field must consist of lower-case alphanumeric characters, '.', '_' or '-', must start and end with an alphanumeric character and must be 63 characters or less (e.g. 'my-name', or 'abc-123').
And the create custom template button should be disabled.

Actual results
There are no validation errors
And I can create the custom template

Scenario 2 - Kube Template Edit
Given I have a kubernetes environment with a custom template
When I edit a kubernetes custom template
And I add characters, which aren’t valid as a kubernetes label

Expected results
Then I should get a validation error This field must consist of lower-case alphanumeric characters, '.', '_' or '-', must start and end with an alphanumeric character and must be 63 characters or less (e.g. 'my-name', or 'abc-123').
And the create custom template button should be disabled.

Actual results
There are no validation errors
And I can save the custom template

Scenario 3 - Docker Template Edit
Given I have a docker environment with a custom template
When I edit a docker custom template
And I add characters, which aren’t valid (This field must consist of lower-case alphanumeric characters, '_' or '-' (e.g. 'my-name', or 'abc-123').)

Expected results
Then I should get a validation error This field must consist of lower-case alphanumeric characters, '_' or '-' (e.g. 'my-name', or 'abc-123').
And the save custom template button should be disabled.

Actual results
There are no validation errors
And I can save the custom template

Scenario 4
Given I’m editing or creating a custom template
When I enter

Expected Behavior

See problem description.

Actual Behavior

See problem description.

Steps to Reproduce

See problem description.

Portainer logs or screenshots

No response

Portainer version

2.18.4

Portainer Edition

Community Edition (CE)

Platform and Version

Docker or Kubernetes

OS and Architecture

Any

Browser

No response

What command did you use to deploy Portainer?

No response

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant