Add Testing for Scorecard Storage Output Feature
@@ -91,5 +91,22 @@ func ScorecardSpec(tc *testutils.TestContext, operatorType string) func() {
Expect(results[0].State).To(Equal(expected[results[0].Name]))
}
})
+
+ It("should configure scorecard storage successfully", func() {
+ cmd = exec.Command(tc.BinaryName, "scorecard", "bundle",
+ "--selector", "suite=basic",
+ "--output", "json",
+ "--test-output", "/testdata",
+ "--wait-time", "4m")
+ outputBytes, err = tc.Run(cmd)
+ Expect(err).NotTo(HaveOccurred())
+ Expect(json.Unmarshal(outputBytes, &output)).To(Succeed())
+
+ Expect(output.Items).To(HaveLen(1))
+ results := output.Items[0].Status.Results
+ Expect(results).To(HaveLen(1))
+ Expect(results[0].Name).To(Equal("basic-check-spec"))
+ Expect(results[0].State).To(Equal(v1alpha3.PassState))
+ })
}
}
