Skip to content

Commit

Permalink
3
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanks committed Feb 7, 2025
1 parent 43e5b20 commit 763bbd2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controllers/version_update_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package controllers

import (
"fmt"
"cdap.io/cdap-operator/api/v1alpha1"
"encoding/json"
"github.com/nsf/jsondiff"
Expand Down Expand Up @@ -220,8 +221,8 @@ var _ = Describe("Controller Suite", func() {

json, _ := json.Marshal(object.Obj.(*k8s.Object).Obj.(*batchv1.Job))
expectedJson, err := ioutil.ReadFile("testdata/pre_upgrade_job.json")
GinkgoWriter.Println("EXPECTED JOB JSON FILE CONTENT:")
GinkgoWriter.Println(string(expectedJson))
fmt.Println("EXPECTED JOB JSON FILE CONTENT:")
fmt.Println(string(expectedJson))
opts := jsondiff.DefaultConsoleOptions()
diff, text := jsondiff.Compare(expectedJson, json, &opts)
Expect(diff.String()).To(Equal(jsondiff.SupersetMatch.String()), text)
Expand Down

0 comments on commit 763bbd2

Please sign in to comment.