mirror of
https://github.com/certbot/certbot.git
synced 2026-06-05 23:04:39 -04:00
Merge branch 'master-upstream' into centos6-migrate-python36
This commit is contained in:
commit
4b6ef3e44b
4 changed files with 11 additions and 14 deletions
|
|
@ -231,12 +231,7 @@ class AccountFileStorage(interfaces.AccountStorage):
|
|||
except IOError as error:
|
||||
raise errors.AccountStorageError(error)
|
||||
|
||||
acc = Account(regr, key, meta)
|
||||
if acc.id != account_id:
|
||||
raise errors.AccountStorageError(
|
||||
"Account ids mismatch (expected: {0}, found: {1}".format(
|
||||
account_id, acc.id))
|
||||
return acc
|
||||
return Account(regr, key, meta)
|
||||
|
||||
def load(self, account_id):
|
||||
return self._load_for_server_path(account_id, self.config.server_path)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
"""Tests for certbot.account."""
|
||||
import datetime
|
||||
import json
|
||||
import shutil
|
||||
import unittest
|
||||
|
||||
import josepy as jose
|
||||
|
|
@ -170,13 +169,6 @@ class AccountFileStorageTest(test_util.ConfigTestCase):
|
|||
def test_load_non_existent_raises_error(self):
|
||||
self.assertRaises(errors.AccountNotFound, self.storage.load, "missing")
|
||||
|
||||
def test_load_id_mismatch_raises_error(self):
|
||||
self.storage.save(self.acc, self.mock_client)
|
||||
shutil.move(os.path.join(self.config.accounts_dir, self.acc.id),
|
||||
os.path.join(self.config.accounts_dir, "x" + self.acc.id))
|
||||
self.assertRaises(errors.AccountStorageError, self.storage.load,
|
||||
"x" + self.acc.id)
|
||||
|
||||
def _set_server(self, server):
|
||||
self.config.server = server
|
||||
from certbot.account import AccountFileStorage
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ targets:
|
|||
user: ubuntu
|
||||
#-----------------------------------------------------------------------------
|
||||
# Debian
|
||||
- ami: ami-01db78123b2b99496
|
||||
name: debian10
|
||||
type: ubuntu
|
||||
virt: hvm
|
||||
user: admin
|
||||
- ami: ami-003f19e0e687de1cd
|
||||
name: debian9
|
||||
type: ubuntu
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ targets:
|
|||
user: ubuntu
|
||||
#-----------------------------------------------------------------------------
|
||||
# Debian
|
||||
- ami: ami-01db78123b2b99496
|
||||
name: debian10
|
||||
type: ubuntu
|
||||
virt: hvm
|
||||
user: admin
|
||||
- ami: ami-003f19e0e687de1cd
|
||||
name: debian9
|
||||
type: ubuntu
|
||||
|
|
|
|||
Loading…
Reference in a new issue