mirror of
https://github.com/Luzifer/go-dhparam.git
synced 2024-11-08 07:10:03 +00:00
Test: Keep travis awake by sending output
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
b6a915824f
commit
fd3eda34cc
2 changed files with 13 additions and 2 deletions
|
@ -10,8 +10,19 @@ import (
|
|||
"testing"
|
||||
)
|
||||
|
||||
func opensslOutput(r GeneratorResult) {
|
||||
switch r {
|
||||
case GeneratorFoundPossiblePrime:
|
||||
os.Stderr.WriteString(".")
|
||||
case GeneratorFirstConfirmation:
|
||||
os.Stderr.WriteString("+")
|
||||
case GeneratorSafePrimeFound:
|
||||
os.Stderr.WriteString("*\n")
|
||||
}
|
||||
}
|
||||
|
||||
func execGeneratorIntegration(t *testing.T, bitsize int, generator Generator) {
|
||||
dh, err := Generate(bitsize, generator, nil)
|
||||
dh, err := Generate(bitsize, generator, opensslOutput)
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to generate DH params: %s", err)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ package dhparam
|
|||
import "testing"
|
||||
|
||||
func TestCheckOwn(t *testing.T) {
|
||||
dh, err := Generate(512, 2, nil)
|
||||
dh, err := Generate(512, 2, opensslOutput)
|
||||
if err != nil {
|
||||
t.Fatalf("Could not generate DH parameters: %s", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue