Skip to content

Commit

Permalink
chore: fixing test #2
Browse files Browse the repository at this point in the history
  • Loading branch information
zach-source committed Nov 22, 2021
1 parent c4236a2 commit 436cd84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions reporter/v2/pkg/reporter/reconcile_task_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"
)

var _ = Describe("reconcile_task", func() {
var _ = FDescribe("reconcile_task", func() {
var (
ns = "openshift-redhat-marketplace"
ctx context.Context
Expand Down Expand Up @@ -69,9 +69,7 @@ var _ = Describe("reconcile_task", func() {
},
)
Expect(err).To(Succeed())
})

BeforeEach(func() {
meterReports = []*marketplacev1alpha1.MeterReport{}
for i := 0; i < 5; i = i + 1 {
report := marketplacev1alpha1.MeterReport{
Expand Down Expand Up @@ -101,13 +99,15 @@ var _ = Describe("reconcile_task", func() {
Expect(sut.report(ctx)).To(Succeed())

for i := range meterReports {
meterReports[i].Status.DataServiceStatus = &marketplacev1alpha1.UploadDetails{
report := meterReports[i]
Expect(k8sClient.Get(ctx, client.ObjectKeyFromObject(report), report)).To(Succeed())
report.Status.DataServiceStatus = &marketplacev1alpha1.UploadDetails{
Target: uploaders.UploaderTargetDataService.Name(),
ID: fmt.Sprintf("%d", i),
Status: marketplacev1alpha1.UploadStatusSuccess,
}
meterReports[i].Status.MetricUploadCount = ptr.Int(50)
Expect(k8sClient.Status().Update(context.Background(), meterReports[i])).To(Succeed())
report.Status.MetricUploadCount = ptr.Int(50)
k8sClient.Status().Update(context.Background(), report)
}

Expect(sut.upload(ctx)).To(Succeed())
Expand Down

0 comments on commit 436cd84

Please sign in to comment.