(t *testing.T)
| 658 | } |
| 659 | |
| 660 | func TestObjectFetch(t *testing.T) { |
| 661 | app := "app1" |
| 662 | key := "key1" |
| 663 | |
| 664 | s := stdapi.New("api", "api") |
| 665 | s.Route("GET", fmt.Sprintf("/apps/%s/objects/%s", app, key), func(c *stdapi.Context) error { |
| 666 | _, err := c.Write([]byte("test")) |
| 667 | return err |
| 668 | }) |
| 669 | |
| 670 | testServer(t, s, func(c *sdk.Client) { |
| 671 | got, err := c.ObjectFetch(app, key) |
| 672 | require.NoError(t, err) |
| 673 | b, _ := io.ReadAll(got) |
| 674 | require.Equal(t, "test", string(b)) |
| 675 | }) |
| 676 | } |
| 677 | |
| 678 | func TestObjectList(t *testing.T) { |
| 679 | app := "app1" |
nothing calls this directly
no test coverage detected