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

feat: add env, labels, annotations e2e test #349

Merged
merged 11 commits into from
Nov 8, 2023

Conversation

kqzh
Copy link
Contributor

@kqzh kqzh commented Oct 17, 2023

What type of PR is this?

  • bug
  • feature
  • enhancement

What problem(s) does this PR solve?

Issue(s) number:

Description:

  • env
  • labels
  • annotations
  • nodeSelector
  • affinity
  • tolerations
  • initContainers
  • sidecarContainers
  • readinessProbe
  • livenessProbe
  • volumes
  • volumeMounts

How do you solve it?

Special notes for your reviewer, ex. impact of this fix, design document, etc:

Comment on lines 274 to 687
for k, v := range component.ComponentSpec().PodAnnotations() {
if sts.Spec.Template.Annotations[k] != v {
klog.InfoS("Check Component statefulset annotations but not expected",
"namespace", sts.Namespace,
"name", sts.Name,
"podAnnotations", sts.Spec.Template.Annotations,
)
return false
}
}
Copy link
Contributor

@veezhang veezhang Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotationsMatchers := make(map[string]any, len(componentConfigExpected))
for k, v := range component.ComponentSpec().PodAnnotations() {
    annotationsMatchers[k] = e2ematcher.ValidatorEq(v)
}

And then put annotationsMatchers in e2ematcher.Struct above?

Copy link
Contributor

@veezhang veezhang Oct 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've add a common func MapContainsMatchers to compare map. #352

@kqzh kqzh force-pushed the add_e2e_test2 branch 2 times, most recently from 2b7931a to 80a3056 Compare October 19, 2023 07:55
@kqzh kqzh force-pushed the add_e2e_test2 branch 2 times, most recently from 213f1f5 to ff9b647 Compare October 27, 2023 03:46
Copy link
Contributor

@veezhang veezhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@veezhang veezhang merged commit 4e53632 into vesoft-inc:master Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants