forked from srvrco/getssl
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Verify that a unified directory, API V2 is selected.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#! /usr/bin/env bats | ||
|
||
load '/bats-support/load.bash' | ||
load '/bats-assert/load.bash' | ||
load '/getssl/test/test_helper.bash' | ||
|
||
# CA with a unified directory (both ACME V1 and V2 at the same URI) | ||
CA="https://api.test4.buypass.no/acme" | ||
|
||
# This is run for every test | ||
setup() { | ||
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure" | ||
|
||
. /getssl/getssl --source | ||
|
||
requires curl | ||
_NOMETER="--silent" | ||
|
||
_RUNNING_TEST=1 | ||
_USE_DEBUG=1 | ||
} | ||
|
||
|
||
teardown() { | ||
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip | ||
} | ||
|
||
|
||
@test "Check that API V2 is selected in a unified ACME directory." { | ||
obtain_ca_resource_locations | ||
|
||
[ "$API" -eq 2 ] | ||
} | ||
|