Skip to content

Commit

Permalink
Fix viewer test
Browse files Browse the repository at this point in the history
  • Loading branch information
caffeinatedpixel committed Jul 17, 2024
1 parent c450224 commit 1406ed2
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion database/threat_intel.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ func parseFeedEntries(feedHash util.FixedString, feed io.ReadCloser, writeChan c

for {
line, readErr := reader.ReadString('\n')
// fmt.Println(line)

// if there is an error reading the line and its not the end of the file, return the error
if readErr != nil && readErr != io.EOF {
Expand Down
1 change: 0 additions & 1 deletion integration_rolling/ttl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ func optimizeMetaDBTables(t *testing.T, db *database.DB, updateTime func(time.Du
require.NoError(t, err)
err = db.Conn.Exec(ctx, `OPTIMIZE TABLE metadatabase.{table:Identifier} FINAL`)
require.NoError(t, err, "optimizing %s.%s should not fail", "metadatabase", table)
// fmt.Println("OPTIMIZED", table)
}
}
func verifyTables(t *testing.T, db *database.DB, importTime time.Time, expect26hEmpty, expect2wEmpty, expect6mEmpty, expect1YrEmpty bool) {
Expand Down
1 change: 0 additions & 1 deletion modifier/modifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ func (modifier *Modifier) detectMIMETypeMismatch(ctx context.Context) error {
rows.Close()
return ctx.Err()
default:
// fmt.Println("hi")
var res analysis.ThreatMixtape
if err := rows.ScanStruct(&res); err != nil {
// return error and cancel all uconn analysis
Expand Down
1 change: 0 additions & 1 deletion util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,6 @@ func TestValidateTimestamp(t *testing.T) {
func TestParseRelativePath(t *testing.T) {
home, err := os.UserHomeDir()
require.NoError(t, err)
fmt.Println("home: ", home)

workingDir, err := os.Getwd()
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions viewer/sidebar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (s *ViewerTestSuite) TestSidebarUpdating() {
items := m.List.Rows.Items()

// get selected row
selectedRow, ok := items[selectedIndex].(viewer.Item)
selectedRow, ok := items[selectedIndex].(*viewer.Item)
require.True(t, ok, "casting item to Item should not return an error")

// check the sidebar data
Expand All @@ -135,7 +135,7 @@ func (s *ViewerTestSuite) TestSidebarUpdating() {
}

// get the selected row after scrolling
selectedRow, ok = items[m.List.Rows.Index()].(viewer.Item)
selectedRow, ok = items[m.List.Rows.Index()].(*viewer.Item)
require.True(t, ok, "casting item to Item should not return an error")

// check the sidebar data
Expand Down
1 change: 0 additions & 1 deletion viewer/viewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func NewModel(maxTimestamp, minTimestamp time.Time, useCurrentTime bool, db *dat
// set sidebar data to whichever item is selected in the list
tmp := dataList.Rows.Items()[dataList.Rows.Index()]
data, ok := tmp.(*Item)
fmt.Println(data, tmp)

if !ok {
return nil, fmt.Errorf("error setting sidebar data")
Expand Down

0 comments on commit 1406ed2

Please sign in to comment.