Uploaded image for project: 'Openshift sandboxed containers'
  1. Openshift sandboxed containers
  2. KATA-3437

automation o.Expect err panics because err is not a string in logging output

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Low Low
    • OSC 1.8.0
    • OSC 1.8.0
    • automated tests
    • None
    • 1
    • False
    • None
    • False
    • Kata Sprint #259
    • 0
    • 0.000

      Description

      If you have

      o.Expect(err).NotTo(o.HaveOccurred(), err)

      it will Panic because it is expecting a string in the NotTo section
       
      The replacement is

      o.Expect(err).NotTo(o.HaveOccurred(), fmt.Sprintf("%v",err))

      Additional helpful info

      The Panic only happens if there is an actual error, making it intermittent.

      The test fails either way.  Making the change means we get useful logs

       

              tbuskey-rh Tom Buskey
              tbuskey-rh Tom Buskey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: