-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Fleet] Edit package policy tests #125068
[Fleet] Edit package policy tests #125068
Conversation
Pinging @elastic/fleet (Team:Fleet) |
* [observability-test-environments](https://github.com/elastic/observability-test-environments): internal project, uses Fleet API [Check here](https://github.com/elastic/observability-test-environments/blob/master/ansible/tasks-fleet-config.yml) | ||
* [ECK](https://github.com/elastic/cloud-on-k8s): Elastic Cloud on Kubernetes, orchestrates Elastic Stack applications, including Kibana with Fleet (no direct dependency, has examples that include Fleet config) [Check here](https://github.com/elastic/cloud-on-k8s/blob/main/docs/orchestrating-elastic-stack-applications/agent-fleet.asciidoc) | ||
* [APM Server](https://github.com/elastic/apm-server) APM Server, receives data from Elastic APM agents. Using docker compose for testing. [Check here](https://github.com/elastic/apm-server/pull/7227/files) |
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.
added APM Server dependency to README
@@ -347,6 +347,8 @@ export const EditPackagePolicyForm = memo<{ | |||
: false; | |||
if (!hasValidationErrors) { | |||
setFormState('VALID'); | |||
} else { | |||
setFormState('INVALID'); |
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.
this is actually a bugfix that create page had as well, form didn't become invalid when clearing a required form input
@@ -105,7 +105,8 @@ export const PackagePolicyInputConfig: React.FunctionComponent<{ | |||
<EuiFlexGroup direction="column" gutterSize="m"> | |||
{requiredVars.map((varDef) => { | |||
const { name: varName, type: varType } = varDef; | |||
const { value, frozen } = packagePolicyInput.vars![varName]; | |||
if (!packagePolicyInput.vars) return; | |||
const { value, frozen } = packagePolicyInput.vars[varName]; |
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.
💛 Build succeeded, but was flakyTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
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.
LGTM
* edit package policy test * moved out styled component, added null checks * added tests for submit (cherry picked from commit f693a23)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
* edit package policy test * moved out styled component, added null checks * added tests for submit (cherry picked from commit f693a23) Co-authored-by: Julia Bardi <[email protected]>
Summary
Added unit tests for Edit package policy covering forceUpgrade flag too.
Related to #123819