func TestFindID(t *testing.T) { fmt.Println("\n\n>>>>>>>>>>>>>>>>>>> TestFindID <<<<<<<<<<<<<<<<<<<<<<<<<<") var id int64 = 100 rpts, err := data.FindID(id) if err != nil { t.Errorf("FindDeviceId failed - error: %q", err) } fmt.Printf("Report ID [%d]:\n%s", id, spew.Sdump(rpts)) id = 102 rpts, err = data.FindID(id) if err != nil { t.Errorf("FindDeviceId failed - error: %q", err) } fmt.Printf("Report ID [%d]:\n%s", id, spew.Sdump(rpts)) }
func TestUpdate(t *testing.T) { fmt.Println("\n>>>>>>>>>>>>>>>>>>> TestUpdate <<<<<<<<<<<<<<<<<<<<<<<<<<") input := inUpdate01 dt, err := Process(input, time.Now()) fmt.Printf("[Process] msg len: %d err: %v\n", len(dt), err) rpts, _ := data.FindID(102) fmt.Printf("Updated report: %s\n", rpts) // fmt.Printf("[Process] returned: %q\n", dt) }
func (st *GetReport) Run() (string, error) { rpts, _ := data.FindID(st.ReportIDV, st.includeComments) log.Debug(">>> rpts:\n%s\n", spew.Sdump(rpts)) resp, _ := response.NewResponseReports(true, st.Start(), rpts) return resp, nil }