(t *testing.T)
| 174 | } |
| 175 | |
| 176 | func TestAddTask(t *testing.T) { |
| 177 | mock, err := newMock(t) |
| 178 | if err != nil { |
| 179 | t.Fatal(err) |
| 180 | } |
| 181 | defer func() { |
| 182 | if err := mock.delete(); err != nil { |
| 183 | t.Errorf("failed delete: %v", err) |
| 184 | } |
| 185 | }() |
| 186 | control, err := New(StaticPath("test"), &specs.LinuxResources{}, WithHierarchy(mock.hierarchy)) |
| 187 | if err != nil { |
| 188 | t.Error(err) |
| 189 | return |
| 190 | } |
| 191 | if err := control.AddTask(Process{Pid: 1234}); err != nil { |
| 192 | t.Error(err) |
| 193 | return |
| 194 | } |
| 195 | for _, s := range Subsystems() { |
| 196 | if err := checkTaskid(mock, filepath.Join(string(s), "test"), 1234); err != nil { |
| 197 | t.Error(err) |
| 198 | return |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | func TestAddTaskFilteredSubsystems(t *testing.T) { |
| 204 | mock, err := newMock(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…