Skip to content

Commit 03e1a33

Browse files
authored
Merge pull request #707 from srvrco/temp-revert-upgrade-with-make
Temporarily revert changes to upgrade using `make`
2 parents d807ad0 + d013dc5 commit 03e1a33

File tree

59 files changed

+383
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+383
-417
lines changed

getssl

Lines changed: 54 additions & 124 deletions
Large diffs are not rendered by default.

test/1-simple-http01-dig.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ load '/getssl/test/test_helper.bash'
77

88
# This is run for every test
99
setup() {
10-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
10+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1111
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
1212
if [ -f /usr/bin/host ]; then
1313
mv /usr/bin/host /usr/bin/host.getssl.bak
@@ -19,7 +19,7 @@ setup() {
1919

2020

2121
teardown() {
22-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
22+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
2323
if [ -f /usr/bin/host.getssl.bak ]; then
2424
mv /usr/bin/host.getssl.bak /usr/bin/host
2525
fi

test/1-simple-http01-nslookup.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ load '/getssl/test/test_helper.bash'
77

88
# This is run for every test
99
setup() {
10-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
10+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1111
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
1212
if [ -f /usr/bin/dig ]; then
1313
mv /usr/bin/dig /usr/bin/dig.getssl.bak
@@ -19,7 +19,7 @@ setup() {
1919

2020

2121
teardown() {
22-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
22+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
2323
if [ -f /usr/bin/dig.getssl.bak ]; then
2424
mv /usr/bin/dig.getssl.bak /usr/bin/dig
2525
fi

test/1-simple-http01-two-acl.bats

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ load '/getssl/test/test_helper.bash'
77

88
# This is run for every test
99
teardown() {
10-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
10+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
1111
}
1212

1313
setup() {
14-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
14+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1515
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
1616
}
1717

@@ -23,9 +23,9 @@ setup() {
2323
CONFIG_FILE="getssl-http01-two-acl.cfg"
2424
setup_environment
2525
init_getssl
26-
create_certificate -d
26+
create_certificate
2727
assert_success
2828
assert_output --partial "to /var/www/html/.well-known/acme-challenge"
2929
assert_output --partial "to /var/webroot/html/.well-known/acme-challenge"
30-
check_output_for_errors "debug"
30+
check_output_for_errors
3131
}

test/1-simple-http01.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ load '/getssl/test/test_helper.bash'
77

88
# This is run for every test
99
teardown() {
10-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
10+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
1111
}
1212

1313
setup() {
14-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
14+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1515
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
1616
}
1717

test/10-mixed-case.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ load '/getssl/test/test_helper.bash'
77

88
# This is run for every test
99
teardown() {
10-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
10+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
1111
}
1212

1313
setup() {
14-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
14+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1515
if [ -z "$STAGING" ]; then
1616
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
1717
fi

test/11-test--install.bats

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ load '/getssl/test/test_helper.bash'
77

88
# This is run for every test
99
teardown() {
10-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
10+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
1111
}
1212

1313
setup() {
14-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
14+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1515
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
1616
}
1717

@@ -38,8 +38,8 @@ setup() {
3838

3939
assert_success
4040
check_output_for_errors
41-
assert_line 'Verification completed, obtaining certificate.'
42-
assert_line 'Requesting certificate'
41+
assert_line --partial 'Verification completed, obtaining certificate.'
42+
assert_line --partial 'Requesting certificate'
4343
refute [ -d '$HOME/.getssl' ]
4444
}
4545

@@ -57,8 +57,8 @@ setup() {
5757

5858
assert_success
5959
check_output_for_errors
60-
refute_line 'Verification completed, obtaining certificate.'
61-
refute_line 'Requesting certificate'
60+
refute_line --partial 'Verification completed, obtaining certificate.'
61+
refute_line --partial 'Requesting certificate'
6262
assert_line --partial 'copying domain certificate to'
6363
assert_line --partial 'copying private key to'
6464
assert_line --partial 'copying CA certificate to'

test/11-test-no-domain-storage.bats

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ load '/getssl/test/test_helper.bash'
66

77

88
setup() {
9-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
9+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1010
}
1111
teardown() {
12-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
12+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
1313
}
1414

1515
@test "Check that if domain storage isn't set getssl doesn't try to delete /tmp" {
@@ -23,5 +23,5 @@ teardown() {
2323
run ${CODE_DIR}/getssl -U -d -a
2424
assert_success
2525
check_output_for_errors
26-
assert_line 'Not going to delete TEMP_DIR ///tmp as it appears to be /tmp'
26+
assert_line --partial 'Not going to delete TEMP_DIR ///tmp as it appears to be /tmp'
2727
}

test/12-auto-upgrade-v1.bats

Lines changed: 10 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ load '/getssl/test/test_helper.bash'
66

77

88
setup() {
9-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
9+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1010
}
11+
12+
1113
teardown() {
12-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
14+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
1315
}
1416

17+
1518
@test "Check that auto upgrade to v2 doesn't change pebble url" {
1619
if [ -n "$STAGING" ]; then
1720
skip "Using staging server, skipping internal test"
@@ -22,17 +25,10 @@ teardown() {
2225
cp "${CODE_DIR}/test/test-config/${CONFIG_FILE}" "${INSTALL_DIR}/.getssl/getssl.cfg"
2326
run ${CODE_DIR}/getssl -U -d --check-config "$GETSSL_CMD_HOST"
2427
assert_success
25-
assert_line 'Using certificate issuer: https://pebble:14000/dir'
28+
assert_line --partial 'Using certificate issuer: https://pebble:14000/dir'
2629
}
2730

2831

29-
setup() {
30-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
31-
}
32-
teardown() {
33-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
34-
}
35-
3632
@test "Check that auto upgrade to v2 doesn't change v2 staging url" {
3733
if [ -n "$STAGING" ]; then
3834
skip "Using staging server, skipping internal test"
@@ -43,17 +39,10 @@ teardown() {
4339
cp "${CODE_DIR}/test/test-config/${CONFIG_FILE}" "${INSTALL_DIR}/.getssl/getssl.cfg"
4440
run ${CODE_DIR}/getssl -U -d --check-config "$GETSSL_CMD_HOST"
4541
assert_success
46-
assert_line 'Using certificate issuer: https://acme-staging-v02.api.letsencrypt.org/directory'
42+
assert_line --partial 'Using certificate issuer: https://acme-staging-v02.api.letsencrypt.org/directory'
4743
}
4844

4945

50-
setup() {
51-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
52-
}
53-
teardown() {
54-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
55-
}
56-
5746
@test "Check that auto upgrade to v2 doesn't change v2 prod url" {
5847
if [ -n "$STAGING" ]; then
5948
skip "Using staging server, skipping internal test"
@@ -64,17 +53,10 @@ teardown() {
6453
cp "${CODE_DIR}/test/test-config/${CONFIG_FILE}" "${INSTALL_DIR}/.getssl/getssl.cfg"
6554
run ${CODE_DIR}/getssl -U -d --check-config "$GETSSL_CMD_HOST"
6655
assert_success
67-
assert_line 'Using certificate issuer: https://acme-v02.api.letsencrypt.org/directory'
56+
assert_line --partial 'Using certificate issuer: https://acme-v02.api.letsencrypt.org/directory'
6857
}
6958

7059

71-
setup() {
72-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
73-
}
74-
teardown() {
75-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
76-
}
77-
7860
@test "Check that auto upgrade to v2 changes v1 staging to v2 staging url" {
7961
if [ -n "$STAGING" ]; then
8062
skip "Using staging server, skipping internal test"
@@ -85,17 +67,10 @@ teardown() {
8567
cp "${CODE_DIR}/test/test-config/${CONFIG_FILE}" "${INSTALL_DIR}/.getssl/getssl.cfg"
8668
run ${CODE_DIR}/getssl -U -d --check-config "$GETSSL_CMD_HOST"
8769
assert_success
88-
assert_line 'Using certificate issuer: https://acme-staging-v02.api.letsencrypt.org/directory'
70+
assert_line --partial 'Using certificate issuer: https://acme-staging-v02.api.letsencrypt.org/directory'
8971
}
9072

9173

92-
setup() {
93-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
94-
}
95-
teardown() {
96-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
97-
}
98-
9974
@test "Check that auto upgrade to v2 changes v1 prod to v2 prod url" {
10075
if [ -n "$STAGING" ]; then
10176
skip "Using staging server, skipping internal test"
@@ -106,5 +81,5 @@ teardown() {
10681
cp "${CODE_DIR}/test/test-config/${CONFIG_FILE}" "${INSTALL_DIR}/.getssl/getssl.cfg"
10782
run ${CODE_DIR}/getssl -U -d --check-config "$GETSSL_CMD_HOST"
10883
assert_success
109-
assert_line 'Using certificate issuer: https://acme-v02.api.letsencrypt.org/directory'
84+
assert_line --partial 'Using certificate issuer: https://acme-v02.api.letsencrypt.org/directory'
11085
}

test/13-notify-valid.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ load '/getssl/test/test_helper.bash'
77

88
# This is run for every test
99
teardown() {
10-
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_TMPDIR/failed.skip
10+
[ -n "$BATS_TEST_COMPLETED" ] || touch $BATS_RUN_TMPDIR/failed.skip
1111
}
1212

1313
setup() {
14-
[ ! -f $BATS_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
14+
[ ! -f $BATS_RUN_TMPDIR/failed.skip ] || skip "skipping tests after first failure"
1515
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
1616
}
1717

0 commit comments

Comments
 (0)