(t *testing.T)
| 716 | } |
| 717 | |
| 718 | func TestProcessGet(t *testing.T) { |
| 719 | app := "app1" |
| 720 | pid := "pid" |
| 721 | p := &structs.Process{ |
| 722 | Id: "id1", |
| 723 | App: "app1", |
| 724 | Command: "command", |
| 725 | Cpu: 5, |
| 726 | Host: "host", |
| 727 | Image: "image", |
| 728 | Instance: "instance", |
| 729 | Memory: 1024, |
| 730 | Name: "name", |
| 731 | Ports: []string{"5000"}, |
| 732 | Release: "release", |
| 733 | Status: "status", |
| 734 | TaskDefinition: "task_definition", |
| 735 | } |
| 736 | |
| 737 | s := stdapi.New("api", "api") |
| 738 | s.Route("GET", fmt.Sprintf("/apps/%s/processes/%s", app, pid), func(c *stdapi.Context) error { |
| 739 | return c.RenderJSON(p) |
| 740 | }) |
| 741 | |
| 742 | testServer(t, s, func(c *sdk.Client) { |
| 743 | got, err := c.ProcessGet(app, pid) |
| 744 | require.NoError(t, err) |
| 745 | require.Equal(t, p, got) |
| 746 | }) |
| 747 | } |
| 748 | |
| 749 | func TestProcessList(t *testing.T) { |
| 750 | app := "app1" |
nothing calls this directly
no test coverage detected