mirror of
https://github.com/Luzifer/go-dhparam.git
synced 2024-12-20 11:01:19 +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"
|
"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) {
|
func execGeneratorIntegration(t *testing.T, bitsize int, generator Generator) {
|
||||||
dh, err := Generate(bitsize, generator, nil)
|
dh, err := Generate(bitsize, generator, opensslOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Unable to generate DH params: %s", err)
|
t.Fatalf("Unable to generate DH params: %s", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package dhparam
|
||||||
import "testing"
|
import "testing"
|
||||||
|
|
||||||
func TestCheckOwn(t *testing.T) {
|
func TestCheckOwn(t *testing.T) {
|
||||||
dh, err := Generate(512, 2, nil)
|
dh, err := Generate(512, 2, opensslOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Could not generate DH parameters: %s", err)
|
t.Fatalf("Could not generate DH parameters: %s", err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue