(t *testing.T)
| 589 | } |
| 590 | |
| 591 | func TestCodespace_ExportData(t *testing.T) { |
| 592 | type fields struct { |
| 593 | Name string |
| 594 | CreatedAt string |
| 595 | DisplayName string |
| 596 | LastUsedAt string |
| 597 | Owner User |
| 598 | Repository Repository |
| 599 | State string |
| 600 | GitStatus CodespaceGitStatus |
| 601 | Connection CodespaceConnection |
| 602 | Machine CodespaceMachine |
| 603 | } |
| 604 | type args struct { |
| 605 | fields []string |
| 606 | } |
| 607 | tests := []struct { |
| 608 | name string |
| 609 | fields fields |
| 610 | args args |
| 611 | want map[string]interface{} |
| 612 | }{ |
| 613 | { |
| 614 | name: "just name", |
| 615 | fields: fields{ |
| 616 | Name: "test", |
| 617 | }, |
| 618 | args: args{ |
| 619 | fields: []string{"name"}, |
| 620 | }, |
| 621 | want: map[string]interface{}{ |
| 622 | "name": "test", |
| 623 | }, |
| 624 | }, |
| 625 | { |
| 626 | name: "just owner", |
| 627 | fields: fields{ |
| 628 | Owner: User{ |
| 629 | Login: "test", |
| 630 | }, |
| 631 | }, |
| 632 | args: args{ |
| 633 | fields: []string{"owner"}, |
| 634 | }, |
| 635 | want: map[string]interface{}{ |
| 636 | "owner": "test", |
| 637 | }, |
| 638 | }, |
| 639 | { |
| 640 | name: "just machine", |
| 641 | fields: fields{ |
| 642 | Machine: CodespaceMachine{ |
| 643 | Name: "test", |
| 644 | }, |
| 645 | }, |
| 646 | args: args{ |
| 647 | fields: []string{"machineName"}, |
| 648 | }, |
nothing calls this directly
no test coverage detected