now supports purging of assets

This commit is contained in:
2017-06-05 19:14:26 +02:00
parent 426237b2a7
commit 162fff134e
8 changed files with 83 additions and 45 deletions

View File

@ -12,18 +12,18 @@ testCflareAccount.auth({
let randomPrefix = Math.floor(Math.random() * 2000)
tap.test('.listZones() -> should display an entire account', async (tools) => {
// tools.timeout(600000)
tools.timeout(600000)
let result = await testCflareAccount.listZones()
console.log(result)
})
tap.test('.getZoneId(domainName) -> should get an Cloudflare Id for a domain string', async (tools) => {
// tools.timeout(600000)
tools.timeout(600000)
await testCflareAccount.getZoneId('bleu.de')
})
tap.test('.listRecords(domainName) -> should list all records for a specific Domain Name', async (tools) => {
// tools.timeout(600000)
tools.timeout(600000)
await testCflareAccount.listRecords('bleu.de')
.then(async (responseArg) => {
console.log(responseArg)
@ -31,12 +31,12 @@ tap.test('.listRecords(domainName) -> should list all records for a specific Dom
})
tap.test('should create a valid record for a subdomain', async (tools) => {
// tools.timeout(600000)
tools.timeout(600000)
await testCflareAccount.createRecord(`${randomPrefix}subdomain.bleu.de`, 'A', '127.0.0.1')
})
tap.test('should get a record from Cloudflare', async (tools) => {
// tools.timeout(600000)
tools.timeout(600000)
await testCflareAccount.getRecord('bleu.de', 'A')
.then(function (responseArg) {
console.log(responseArg)
@ -44,11 +44,15 @@ tap.test('should get a record from Cloudflare', async (tools) => {
})
tap.test('should remove a subdomain record from Cloudflare', async (tools) => {
// tools.timeout(600000)
tools.timeout(600000)
await testCflareAccount.removeRecord(`${randomPrefix}subdomain.bleu.de`, 'A')
.then(async (responseArg) => {
console.log(responseArg)
})
})
tap.test('.purge(some.domain) -> should purge everything', async () => {
await testCflareAccount.purgeZone('bleu.de')
})
tap.start()