lego/providers/dns/rackspace/rackspace_mock_test.go
Ludovic Fernandez 42941ccea6
Refactor the core of the lib (#700)
- Packages
- Isolate code used by the CLI into the package `cmd`
- (experimental) Add e2e tests for HTTP01, TLS-ALPN-01 and DNS-01, use [Pebble](https://github.com/letsencrypt/pebble) and [challtestsrv](https://github.com/letsencrypt/boulder/tree/master/test/challtestsrv) 
- Support non-ascii domain name (punnycode)
- Check all challenges in a predictable order
- No more global exported variables
- Archive revoked certificates
- Fixes revocation for subdomains and non-ascii domains
- Disable pending authorizations
- use pointer for RemoteError/ProblemDetails
- Poll authz URL instead of challenge URL
- The ability for a DNS provider to solve the challenge sequentially
- Check all nameservers in a predictable order
- Option to disable the complete propagation Requirement
- CLI, support for renew with CSR
- CLI, add SAN on renew
- Add command to list certificates.
- Logs every iteration of waiting for the propagation
- update DNSimple client
- update github.com/miekg/dns
2018-12-06 22:50:17 +01:00

87 lines
2 KiB
Go

package rackspace
const recordDeleteMock = `
{
"status": "RUNNING",
"verb": "DELETE",
"jobId": "00000000-0000-0000-0000-0000000000",
"callbackUrl": "https://dns.api.rackspacecloud.com/v1.0/123456/status/00000000-0000-0000-0000-0000000000",
"requestUrl": "https://dns.api.rackspacecloud.com/v1.0/123456/domains/112233/recordsid=TXT-654321"
}
`
const recordDetailsMock = `
{
"records": [
{
"name": "_acme-challenge.example.com",
"id": "TXT-654321",
"type": "TXT",
"data": "pW9ZKG0xz_PCriK-nCMOjADy9eJcgGWIzkkj2fN4uZM",
"ttl": 300,
"updated": "1970-01-01T00:00:00.000+0000",
"created": "1970-01-01T00:00:00.000+0000"
}
]
}
`
const zoneDetailsMock = `
{
"domains": [
{
"name": "example.com",
"id": 112233,
"emailAddress": "hostmaster@example.com",
"updated": "1970-01-01T00:00:00.000+0000",
"created": "1970-01-01T00:00:00.000+0000"
}
],
"totalEntries": 1
}
`
const identityResponseMock = `
{
"access": {
"token": {
"id": "testToken",
"expires": "1970-01-01T00:00:00.000Z",
"tenant": {
"id": "123456",
"name": "123456"
},
"RAX-AUTH:authenticatedBy": [
"APIKEY"
]
},
"serviceCatalog": [
{
"type": "rax:dns",
"endpoints": [
{
"publicURL": "https://dns.api.rackspacecloud.com/v1.0/123456",
"tenantId": "123456"
}
],
"name": "cloudDNS"
}
],
"user": {
"id": "fakeUseID",
"name": "testUser"
}
}
}
`
const recordResponseMock = `
{
"request": "{\"records\":[{\"name\":\"_acme-challenge.example.com\",\"type\":\"TXT\",\"data\":\"pW9ZKG0xz_PCriK-nCMOjADy9eJcgGWIzkkj2fN4uZM\",\"ttl\":300}]}",
"status": "RUNNING",
"verb": "POST",
"jobId": "00000000-0000-0000-0000-0000000000",
"callbackUrl": "https://dns.api.rackspacecloud.com/v1.0/123456/status/00000000-0000-0000-0000-0000000000",
"requestUrl": "https://dns.api.rackspacecloud.com/v1.0/123456/domains/112233/records"
}
`