(t *testing.T)
| 57 | ) |
| 58 | |
| 59 | func TestSplitBatchCheckOutput(t *testing.T) { |
| 60 | buf := bytes.NewBuffer([]byte(simpleBatchCheckOutput)) |
| 61 | commitsMap, err := splitBatchCheckOutput(buf) |
| 62 | if err != nil { |
| 63 | t.Fatal(err) |
| 64 | } |
| 65 | if !commitsMap["ddbdcb9d5aa71d35de481789bacece9a2f8138d0"] { |
| 66 | t.Fatal("Failed to recognize the first commit as valid") |
| 67 | } |
| 68 | if !commitsMap["de9ebcdf2a1e93365eefc2739f73f2c68a280c11"] { |
| 69 | t.Fatal("Failed to recognize the second commit as valid") |
| 70 | } |
| 71 | if !commitsMap["e90f75882526e9bc5a71af64d60ea50092ed0b1d"] { |
| 72 | t.Fatal("Failed to recognize the last commit as valid") |
| 73 | } |
| 74 | if commitsMap["df324616ea2bc9bf6fc7025fc80a373ecec687b6"] { |
| 75 | t.Fatal("Failed to filter out a missing object") |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | func TestSplitBatchCatFileOutput(t *testing.T) { |
| 80 | buf := bytes.NewBuffer([]byte(simpleBatchCatFileOutput)) |
nothing calls this directly
no test coverage detected