(t *testing.T)
| 617 | } |
| 618 | |
| 619 | func TestShowColumns(t *testing.T) { |
| 620 | if skipIntegrateTest { |
| 621 | t.Skip("Integration tests skipped") |
| 622 | } |
| 623 | |
| 624 | ctx, cancel := context.WithTimeout(context.Background(), 180*time.Second) |
| 625 | defer cancel() |
| 626 | |
| 627 | session, tableId, tearDown := setup(t, ctx, []string{}) |
| 628 | defer tearDown() |
| 629 | |
| 630 | stmt, err := BuildStatement(fmt.Sprintf("SHOW COLUMNS FROM %s", tableId)) |
| 631 | if err != nil { |
| 632 | t.Fatalf("invalid statement: error=%s", err) |
| 633 | } |
| 634 | |
| 635 | result, err := stmt.Execute(ctx, session) |
| 636 | if err != nil { |
| 637 | t.Fatalf("unexpected error happened: %s", err) |
| 638 | } |
| 639 | |
| 640 | compareResult(t, result, &Result{ |
| 641 | ColumnNames: []string{"Field", "Type", "NULL", "Key", "Key_Order", "Options"}, |
| 642 | Rows: []Row{ |
| 643 | Row{[]string{"id", "INT64", "NO", "PRIMARY_KEY", "ASC", "NULL"}}, |
| 644 | Row{[]string{"active", "BOOL", "NO", "NULL", "NULL", "NULL"}}, |
| 645 | }, |
| 646 | AffectedRows: 2, |
| 647 | IsMutation: false, |
| 648 | }) |
| 649 | } |
| 650 | |
| 651 | func TestShowIndexes(t *testing.T) { |
| 652 | if skipIntegrateTest { |
nothing calls this directly
no test coverage detected