...

Text file src/github.com/letsencrypt/boulder/test/test-caa-log-checker.sh

Documentation: github.com/letsencrypt/boulder/test

     1#!/usr/bin/env bash
     2#
     3# Run the CAA log checker over logs from an integration tests run.
     4#
     5# We verify two things:
     6#  - It should succeed when given the full output as both RA logs and VA logs.
     7#  - It should fail when given RA logs (containing issuances) but empty VA logs
     8#    (containing CAA checks).
     9#
    10
    11set -x
    12
    13LOGFILE=/tmp/boulder.log
    14
    15# We rely on the integration tests previously having been run with a container
    16# name of "boulder_tests". See ../t.sh.
    17docker logs boulder_tests > ${LOGFILE}
    18
    19# Expect success
    20./bin/boulder caa-log-checker -ra-log ${LOGFILE} -va-logs ${LOGFILE}
    21
    22# Expect error
    23./bin/boulder caa-log-checker -ra-log ${LOGFILE} -va-logs /dev/null >/tmp/output 2>&1 &&
    24  (echo "caa-log-checker succeeded when it should have failed. Output:";
    25   cat /tmp/output;
    26   exit 9)
    27
    28# Explicitly exit zero so the status code from the intentionally-erroring last
    29# command doesn't wind up as the overall status code for this script.
    30exit 0

View as plain text