Reduce test CA difficulty (#1010)

* reduce test CA difficulty

* reduce docker ca difficulty
This commit is contained in:
Egon Elbre 2019-01-10 16:23:33 +02:00 committed by Michal Niewrzal
parent eb69ecadec
commit 34125fe614
5 changed files with 17 additions and 5 deletions

View File

@ -2,6 +2,9 @@
set -euo pipefail
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
if [[ -n "${CA_DIFFICULTY}" ]]; then
SETUP_PARAMS="--ca.difficulty ${CA_DIFFICULTY}"
fi
./gateway setup
fi

View File

@ -6,7 +6,10 @@ if [[ -n "${API_KEY}" ]]; then
fi
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
./satellite setup
if [[ -n "${CA_DIFFICULTY}" ]]; then
SETUP_PARAMS="--ca.difficulty ${CA_DIFFICULTY}"
fi
./satellite setup $SETUP_PARAMS
fi
RUN_PARAMS="${RUN_PARAMS:-} --config-dir ${CONF_PATH}"

View File

@ -2,6 +2,9 @@
set -euo pipefail
if [[ ! -f "${CONF_PATH}/config.yaml" ]]; then
if [[ -n "${CA_DIFFICULTY}" ]]; then
SETUP_PARAMS="--ca.difficulty ${CA_DIFFICULTY}"
fi
./storagenode setup
fi

View File

@ -18,6 +18,7 @@ services:
satellite:
image: storjlabs/satellite:${VERSION:-latest}
environment:
- CA_DIFFICULTY=4
- API_KEY=abc123
- BOOTSTRAP_ADDR=localhost:8080
- STORJ_CHECKER_QUEUE_ADDRESS=redis://redis:6379/?db=0
@ -37,6 +38,7 @@ services:
storagenode:
image: storjlabs/storagenode:${VERSION:-latest}
environment:
- CA_DIFFICULTY=4
- SATELLITE_ADDR=satellite:7777
- STORJ_KADEMLIA_EXTERNAL_ADDRESS=storagenode:7777
- STORJ_KADEMLIA_OPERATOR_EMAIL=hello@storj.io
@ -49,6 +51,7 @@ services:
image: storjlabs/gateway:${VERSION:-latest}
command: --rs.min-threshold 1 --rs.max-threshold 1 --rs.repair-threshold 1 --rs.success-threshold 1
environment:
- CA_DIFFICULTY=4
- API_KEY=abc123
- SATELLITE_ADDR=satellite:7777
- STORJ_LOG_LEVEL=debug

View File

@ -13,8 +13,8 @@ import (
// correct difficulty and concurrency
func NewTestIdentity(ctx context.Context) (*provider.FullIdentity, error) {
ca, err := provider.NewCA(ctx, provider.NewCAOptions{
Difficulty: 12,
Concurrency: 4,
Difficulty: 4,
Concurrency: 1,
})
if err != nil {
return nil, err
@ -29,7 +29,7 @@ func NewTestIdentity(ctx context.Context) (*provider.FullIdentity, error) {
// NewTestCA returns a ca with a default difficulty and concurrency for use in tests
func NewTestCA(ctx context.Context) (*provider.FullCertificateAuthority, error) {
return provider.NewCA(ctx, provider.NewCAOptions{
Difficulty: 12,
Concurrency: 4,
Difficulty: 4,
Concurrency: 1,
})
}