| Conditions | 5 |
| Total Lines | 23 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | package entropychecker |
||
| 8 | func TestEntropyChecker(t *testing.T) { |
||
| 9 | err := WaitForEntropy() |
||
| 10 | if err != nil { |
||
| 11 | t.Error(err) |
||
| 12 | return |
||
| 13 | } |
||
| 14 | |||
| 15 | entropy, err := GetEntropy() |
||
| 16 | if err != nil { |
||
| 17 | t.Error(err) |
||
| 18 | return |
||
| 19 | } |
||
| 20 | |||
| 21 | if entropy < MinimumEntropy { |
||
| 22 | t.Error("Insufficient entropy not properly detected") |
||
| 23 | return |
||
| 24 | } |
||
| 25 | |||
| 26 | Timeout = 0 |
||
| 27 | err = WaitForEntropy() |
||
| 28 | if err != nil { |
||
| 29 | t.Error(err) |
||
| 30 | return |
||
| 31 | } |
||
| 57 |