Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay07GIT committed Mar 13, 2024
1 parent 4e57d7c commit d19a586
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion bin/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -e
VINYLDNS_VERSION="0.10.4"

echo "Removing VinylDNS API if exists.."
if docker ps | grep -q "vinyldns-js-api"; then
if docker ps -a| grep -q "vinyldns-js-api"; then
docker kill vinyldns-js-api &> /dev/null || true
docker rm vinyldns-js-api &> /dev/null || true
echo "Removed VinylDNS API"
Expand Down
16 changes: 5 additions & 11 deletions test/integration/vinyldns_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,13 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {
let testZone;

describe('its support of VinylDNS group creation', () => {
it('can create groups', (done) => {
it('can create groups', () => {
vinyl.createGroup(buildGroup())
.then(result => {
// save the result in the `testGroup` variable for other tests to use
testGroup = result;

assert.equal(result.name, 'ok-group');

done();
});
});
});
Expand Down Expand Up @@ -102,7 +100,7 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {
});

describe('its support of VinylDNS zone creation', () => {
it('can create a zone', (done) => {
it('can create a zone', () => {
vinyl.createZone(buildZone(testGroup.id))
.then(result => {
// Save the result as `testZone` for other tests to use
Expand All @@ -112,7 +110,6 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {
setTimeout(() => {
assert.equal(result.zone.name, 'vinyldns.');

done();
}, 2000);
});
});
Expand Down Expand Up @@ -145,7 +142,7 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {
});

describe('its support of VinylDNS record sets', () => {
it('can create a record set', (done) => {
it('can create a record set', () => {
vinyl.createRecordSet({
name: 'record-set-tests-create',
type: 'A',
Expand All @@ -159,13 +156,12 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {
.then(result => {
assert.equal(result.recordSet.name, 'record-set-tests-create');
assert.equal(result.recordSet.ownerGroupId, testGroup.id);
done();
});
});
});

describe('its support of VinylDNS group updating', () => {
it('can update a group', (done) => {
it('can update a group', () => {
let g = testGroup;

g.name = 'group-tests-group-updated';
Expand All @@ -175,7 +171,6 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {

assert.equal(result.name, 'group-tests-group-updated');

done();
});
});
});
Expand All @@ -201,7 +196,7 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {
});

describe('its support of VinylDNS batch changes', () => {
it('can create a batch change', (done) => {
it('can create a batch change', () => {

let batch = {
comments: 'this is optional',
Expand All @@ -223,7 +218,6 @@ describe('VinylDNS interaction with a real VinylDNS API', () => {
.then(result => {
assert.equal(result.changes[0].recordName, 'testadd');
assert.equal(result.ownerGroupId, testGroup.id);
done();
});
});
});
Expand Down

0 comments on commit d19a586

Please sign in to comment.