Merge pull request #549 from letsencrypt/delete_old_tests
remove recently mooted test files
This commit is contained in:
commit
e0ad951855
10
start.sh
10
start.sh
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
# Run both boulder and cfssl, using test configs.
|
||||
if type realpath >/dev/null 2>/dev/null; then
|
||||
cd $(realpath $(dirname $0))
|
||||
fi
|
||||
|
||||
# Kill all children on exit.
|
||||
export BOULDER_CONFIG=${BOULDER_CONFIG:-test/boulder-config.json}
|
||||
|
||||
exec go run ./cmd/boulder/main.go
|
||||
|
|
@ -1,143 +0,0 @@
|
|||
{
|
||||
"syslog": {
|
||||
"network": "",
|
||||
"server": "",
|
||||
"tag": "boulder"
|
||||
},
|
||||
|
||||
"amqp": {
|
||||
"server": "amqp://guest:guest@localhost:5672",
|
||||
"RA": {
|
||||
"client": "RA.client",
|
||||
"server": "RA.server"
|
||||
},
|
||||
"VA": {
|
||||
"client": "VA.client",
|
||||
"server": "VA.server"
|
||||
},
|
||||
"SA": {
|
||||
"client": "SA.client",
|
||||
"server": "SA.server"
|
||||
},
|
||||
"CA": {
|
||||
"client": "CA.client",
|
||||
"server": "CA.server"
|
||||
}
|
||||
},
|
||||
|
||||
"statsd": {
|
||||
"server": "localhost:8125",
|
||||
"prefix": "Boulder"
|
||||
},
|
||||
|
||||
"wfe": {
|
||||
"listenAddress": "127.0.0.1:4300",
|
||||
"certCacheDuration": "6h",
|
||||
"certNoCacheExpirationWindow": "8765h",
|
||||
"indexCacheDuration": "24h",
|
||||
"issuerCacheDuration": "48h",
|
||||
"debugAddr": "localhost:8000"
|
||||
},
|
||||
|
||||
"ca": {
|
||||
"serialPrefix": 255,
|
||||
"profile": "ee",
|
||||
"dbDriver": "sqlite3",
|
||||
"dbConnect": ":memory:",
|
||||
"debugAddr": "localhost:8001",
|
||||
"testMode": true,
|
||||
"_comment": "This should only be present in testMode. In prod use an HSM.",
|
||||
"Key": {
|
||||
"File": "test/test-ca.key"
|
||||
},
|
||||
"expiry": "2160h",
|
||||
"lifespanOCSP": "96h",
|
||||
"maxNames": 1000,
|
||||
"cfssl": {
|
||||
"signing": {
|
||||
"profiles": {
|
||||
"ee": {
|
||||
"usages": [
|
||||
"digital signature",
|
||||
"key encipherment",
|
||||
"server auth",
|
||||
"client auth"
|
||||
],
|
||||
"backdate": "1h",
|
||||
"is_ca": false,
|
||||
"issuer_urls": [
|
||||
"http://int-x1.letsencrypt.org/cert"
|
||||
],
|
||||
"ocsp_url": "http://int-x1.letsencrypt.org/ocsp",
|
||||
"crl_url": "http://int-x1.letsencrypt.org/crl",
|
||||
"policies": [
|
||||
{
|
||||
"ID": "2.23.140.1.2.1"
|
||||
},
|
||||
{
|
||||
"ID": "1.2.3.4",
|
||||
"Qualifiers": [ {
|
||||
"type": "id-qt-cps",
|
||||
"value": "http://example.com/cps"
|
||||
}, {
|
||||
"type": "id-qt-unotice",
|
||||
"value": "Do What Thou Wilt"
|
||||
} ]
|
||||
}
|
||||
],
|
||||
"expiry": "8760h",
|
||||
"CSRWhitelist": {
|
||||
"PublicKeyAlgorithm": true,
|
||||
"PublicKey": true,
|
||||
"SignatureAlgorithm": true
|
||||
},
|
||||
"UseSerialSeq": true
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"usages": [
|
||||
"digital signature"
|
||||
],
|
||||
"expiry": "8760h"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"ra": {
|
||||
"debugAddr": "localhost:8002"
|
||||
},
|
||||
|
||||
"sa": {
|
||||
"dbDriver": "sqlite3",
|
||||
"dbConnect": ":memory:",
|
||||
"debugAddr": "localhost:8003"
|
||||
},
|
||||
|
||||
"va": {
|
||||
"userAgent": "boulder",
|
||||
"debugAddr": "localhost:8004"
|
||||
},
|
||||
|
||||
"sql": {
|
||||
"SQLDebug": false,
|
||||
"CreateTables": true
|
||||
},
|
||||
|
||||
"mail": {
|
||||
"server": "mail.example.com",
|
||||
"port": "25",
|
||||
"username": "cert-master@example.com",
|
||||
"password": "password"
|
||||
},
|
||||
|
||||
"common": {
|
||||
"baseURL": "http://localhost:4300",
|
||||
"issuerCert": "test/test-ca.pem",
|
||||
"maxKeySize": 4096,
|
||||
"dnsResolver": "127.0.0.1:8053",
|
||||
"dnsTimeout": "10s"
|
||||
},
|
||||
|
||||
"subscriberAgreementURL": "http://example.com/terms"
|
||||
}
|
||||
|
|
@ -1,79 +0,0 @@
|
|||
#!/usr/bin/env python2.7
|
||||
import os
|
||||
import shutil
|
||||
import socket
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
|
||||
tempdir = tempfile.mkdtemp()
|
||||
|
||||
exit_status = 0
|
||||
|
||||
def die():
|
||||
global exit_status
|
||||
exit_status = 1
|
||||
sys.exit(1)
|
||||
|
||||
def build(path):
|
||||
cmd = 'go build -o %s/%s %s' % (tempdir, os.path.basename(path), path)
|
||||
print(cmd)
|
||||
if subprocess.Popen(cmd, shell=True).wait() != 0:
|
||||
die()
|
||||
|
||||
build('./cmd/boulder')
|
||||
|
||||
boulder = subprocess.Popen('''
|
||||
exec %s/boulder --config test/boulder-test-config.json
|
||||
''' % tempdir, shell=True)
|
||||
|
||||
def run_test():
|
||||
os.chdir('test/js')
|
||||
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
# Wait up to 7 seconds for Boulder to come up.
|
||||
for i in range(0, 7):
|
||||
try:
|
||||
s.connect(('localhost', 4300))
|
||||
break
|
||||
except socket.error, e:
|
||||
time.sleep(1)
|
||||
|
||||
if subprocess.Popen('npm install', shell=True).wait() != 0:
|
||||
die()
|
||||
|
||||
issue = subprocess.Popen('''
|
||||
node test.js --email foo@letsencrypt.org --agree true \
|
||||
--domains foo.com --new-reg http://localhost:4300/acme/new-reg \
|
||||
--certKey %s/key.pem --cert %s/cert.der
|
||||
''' % (tempdir, tempdir), shell=True)
|
||||
if issue.wait() != 0:
|
||||
die()
|
||||
revoke = subprocess.Popen('''
|
||||
node revoke.js %s/cert.der %s/key.pem http://localhost:4300/acme/revoke-cert
|
||||
''' % (tempdir, tempdir), shell=True)
|
||||
if revoke.wait() != 0:
|
||||
die()
|
||||
|
||||
try:
|
||||
run_test()
|
||||
except Exception as e:
|
||||
exit_status = 1
|
||||
print e
|
||||
finally:
|
||||
# Check whether boulder died. This can happen, for instance, if there was an
|
||||
# existing boulder already listening on the port.
|
||||
if boulder.poll() is not None:
|
||||
print("Boulder died")
|
||||
exit_status = 1
|
||||
else:
|
||||
boulder.kill()
|
||||
|
||||
shutil.rmtree(tempdir)
|
||||
|
||||
if exit_status == 0:
|
||||
print("SUCCESS")
|
||||
else:
|
||||
print("FAILURE")
|
||||
sys.exit(exit_status)
|
||||
Loading…
Reference in New Issue