Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yamatcha committed Nov 29, 2024
1 parent 8ac39fa commit b4bc8a8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions api/v1beta2/mysqlcluster_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,23 @@ var _ = Describe("MySQLCluster Webhook", func() {
Expect(err).NotTo(HaveOccurred())
})

It("should deny an invalid logRotationSchedule", func() {
r := makeMySQLCluster()
r.Spec.LogRotationSchedule = "hoge fuga"
err := k8sClient.Create(ctx, r)
Expect(err).To(HaveOccurred())
})

It("should allow a valid logRotationSize", func() {
r := makeMySQLCluster()
r.Spec.LogRotationSize = 1024
err := k8sClient.Create(ctx, r)
Expect(err).NotTo(HaveOccurred())
})

It("should deny an invalid logRotationSchedule", func() {
It("should deny an invalid logRotationSize", func() {
r := makeMySQLCluster()
r.Spec.LogRotationSchedule = "hoge fuga"
r.Spec.LogRotationSize = -1
err := k8sClient.Create(ctx, r)
Expect(err).To(HaveOccurred())
})
Expand Down

0 comments on commit b4bc8a8

Please sign in to comment.