dns: fqdn only needs domain string

This is from the caas days, when we had hyphenated subdomains flag
This commit is contained in:
Girish Ramakrishnan
2022-11-28 21:23:06 +01:00
parent cab7409d85
commit b70572a6e9
23 changed files with 75 additions and 87 deletions

View File

@@ -10,7 +10,9 @@ const common = require('./common.js'),
expect = require('expect.js');
describe('DNS', function () {
const { setup, cleanup, app, domain } = common;
const { setup, cleanup, app, domain:domainObject } = common;
const domain = domainObject.domain;
before(setup);
after(cleanup);
@@ -23,8 +25,7 @@ describe('DNS', function () {
it('cannot have >63 length subdomains', function () {
const s = Array(64).fill('s').join('');
expect(dns.validateHostname(s, domain)).to.be.an(Error);
const domainCopy = Object.assign({}, domain, { zoneName: `dev.${s}.example.com` });
expect(dns.validateHostname(`dev.${s}`, domainCopy)).to.be.an(Error);
expect(dns.validateHostname(`dev.${s}`, domain)).to.be.an(Error);
});
it('allows only alphanumerics and hypen', function () {