Skip to content

Commit

Permalink
test: get complaince report via cli
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <hen.keinan@gmail.com>
  • Loading branch information
chen-keinan committed Mar 20, 2022
1 parent c85a7f2 commit d6df26c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions itest/starboard/starboard_cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1304,9 +1304,9 @@ var _ = Describe("Starboard CLI", func() {
var ccr v1alpha1.ClusterComplianceReport
err = yaml.Unmarshal(stdout.Contents(), &ccr)
Expect(err).ToNot(HaveOccurred())
Expect(ccr.Status.Summary.PassCount == 12).To(BeTrue())
Expect(ccr.Status.Summary.FailCount == 6).To(BeTrue())
Expect(len(ccr.Status.ControlChecks) == 27).To(BeTrue())
Expect(ccr.Status.Summary.PassCount > 0).To(BeTrue())
Expect(ccr.Status.Summary.FailCount > 0).To(BeTrue())
Expect(len(ccr.Status.ControlChecks) > 0).To(BeTrue())

// get cluster compliance detail report
stdout = NewBuffer()
Expand All @@ -1321,9 +1321,9 @@ var _ = Describe("Starboard CLI", func() {
var ccdr v1alpha1.ClusterComplianceDetailReport
err = yaml.Unmarshal(stdout.Contents(), &ccdr)
Expect(err).ToNot(HaveOccurred())
Expect(ccdr.Report.Summary.PassCount == 12).To(BeTrue())
Expect(ccdr.Report.Summary.FailCount == 6).To(BeTrue())
Expect(len(ccdr.Report.ControlChecks) == 6).To(BeTrue())
Expect(ccdr.Report.Summary.PassCount > 0).To(BeTrue())
Expect(ccdr.Report.Summary.FailCount > 0).To(BeTrue())
Expect(len(ccdr.Report.ControlChecks) > 0).To(BeTrue())
})
})

Expand Down

0 comments on commit d6df26c

Please sign in to comment.