Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Adrien Dorsaz
acme-dns-tiny
Commits
81097552
Commit
81097552
authored
Aug 24, 2016
by
Adrien Dorsaz
Browse files
test: rename monkey as config maker and clean its useless imports
parent
1056a460
Pipeline
#46
passed with stage
in 5 minutes and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/
m
onke
y
.py
→
tests/
c
on
fig_ma
ke
r
.py
View file @
81097552
import
os
,
sys
,
configparser
import
os
,
configparser
from
tempfile
import
NamedTemporaryFile
from
subprocess
import
Popen
from
urllib.request
import
urlopen
# domain with server.py running on it for testing
DOMAIN
=
os
.
getenv
(
"GITLABCI_DOMAIN"
)
...
...
@@ -16,7 +15,7 @@ TSIGKEYVALUE = os.getenv("GITLABCI_TSIGKEYVALUE")
TSIGALGORITHM
=
os
.
getenv
(
"GITLABCI_TSIGALGORITHM"
)
# generate account and domain keys
def
gen_config
s
():
def
gen_config
():
# good account key
account_key
=
NamedTemporaryFile
()
Popen
([
"openssl"
,
"genrsa"
,
"-out"
,
account_key
.
name
,
"2048"
]).
wait
()
...
...
tests/test_module.py
View file @
81097552
...
...
@@ -2,11 +2,11 @@ import unittest, sys
from
subprocess
import
Popen
,
PIPE
from
io
import
StringIO
import
acme_dns_tiny
from
.
m
onke
y
import
gen_config
s
from
.
c
on
fig_ma
ke
r
import
gen_config
from
.acme_account_delete
import
delete_account
import
logassert
CONFIGS
=
gen_config
s
()
CONFIGS
=
gen_config
()
class
TestModule
(
unittest
.
TestCase
):
"Tests for acme_dns_tiny.get_crt()"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment