Skip to content

Commit

Permalink
tests(0.13_0.14) test ssl cert & snis migration
Browse files Browse the repository at this point in the history
  • Loading branch information
kikito committed Apr 10, 2018
1 parent d891ffe commit 46bd91c
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
25 changes: 25 additions & 0 deletions upgrade_paths/0.13_0.14/after/001-certificates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[
[ "Check that the certificates on creation were translated correctly",
[ "admin", "GET", "/certificates/foo.com" ],
[ 200, {
"%id": "[0-9a-fA-F\\-]+",
"server_names": [
"bar.com", "foo.com"
],
"cert": "cert",
"key": "key"
} ]
],

[ "Check that the certificates added after creation where translated correctly",
[ "admin", "GET", "/certificates/baz.com" ],
[ 200, {
"%id": "[0-9a-fA-F\\-]+",
"server_names": [
"baz.com"
],
"cert": "cert",
"key": "key"
} ]
]
]
35 changes: 35 additions & 0 deletions upgrade_paths/0.13_0.14/before/001-ssl-certificates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
[ "Create a ssl certificate with snis attached",
[ "admin", "POST", "/certificates", {
"cert": "cert",
"key": "key",
"snis": "foo.com,bar.com"
} ],
[ 201 ]
],

[ "Create a ssl certificate with no snis attached",
[ "admin", "POST", "/certificates", {
"cert": "cert",
"key": "key"
} ],
[ 201 ]
],

[ "cert_3",
[ "admin", "POST", "/certificates", {
"cert": "cert",
"key": "key"
} ],
[ 201 ]
],

[ "Attach a server name to cert_2",
[ "admin", "POST", "/snis", {
"ssl_certificate_id": "#{cert_3.id}",
"name": "baz.com"
} ],
[ 201 ]
]

]

0 comments on commit 46bd91c

Please sign in to comment.