Skip to content

Commit

Permalink
fix sidecarset e2e (#1724)
Browse files Browse the repository at this point in the history
Signed-off-by: liheng.zms <liheng.zms@alibaba-inc.com>
  • Loading branch information
zmberg authored Sep 3, 2024
1 parent 68a3793 commit 4918768
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions test/e2e/apps/sidecarset.go
Original file line number Diff line number Diff line change
Expand Up @@ -853,10 +853,12 @@ var _ = SIGDescribe("SidecarSet", func() {
gomega.Expect(err).NotTo(gomega.HaveOccurred())
for _, pod := range pods {
origin := sets.String{}
for _, sidecar := range sidecarSetIn.Spec.Containers {
origin.Insert(sidecar.Name)
}
for _, sidecar := range sidecarSetIn.Spec.InitContainers {
if sidecarcontrol.IsSidecarContainer(sidecar.Container) {
origin.Insert(sidecar.Name)
}
}
for _, sidecar := range sidecarSetIn.Spec.Containers {
origin.Insert(sidecar.Name)
}
// SidecarSetHashAnnotation = "kruise.io/sidecarset-hash"
Expand Down Expand Up @@ -902,10 +904,12 @@ var _ = SIGDescribe("SidecarSet", func() {
gomega.Expect(err).NotTo(gomega.HaveOccurred())
for _, pod := range pods {
origin := sets.String{}
for _, sidecar := range sidecarSetIn.Spec.Containers {
origin.Insert(sidecar.Name)
}
for _, sidecar := range sidecarSetIn.Spec.InitContainers {
if sidecarcontrol.IsSidecarContainer(sidecar.Container) {
origin.Insert(sidecar.Name)
}
}
for _, sidecar := range sidecarSetIn.Spec.Containers {
origin.Insert(sidecar.Name)
}
// SidecarSetHashAnnotation = "kruise.io/sidecarset-hash"
Expand Down Expand Up @@ -950,6 +954,11 @@ var _ = SIGDescribe("SidecarSet", func() {
gomega.Expect(err).NotTo(gomega.HaveOccurred())
for _, pod := range pods {
origin := sets.String{}
for _, sidecar := range sidecarSetIn.Spec.InitContainers {
if sidecarcontrol.IsSidecarContainer(sidecar.Container) {
origin.Insert(sidecar.Name)
}
}
for _, sidecar := range sidecarSetIn.Spec.Containers {
origin.Insert(sidecar.Name)
}
Expand Down

0 comments on commit 4918768

Please sign in to comment.