-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(run parameters): Don't include
WAFFLE_SERVER_TAG
validation in…
… normal validation Closes #533
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import * as chai from 'chai'; | ||
import { head } from 'lodash'; | ||
import { exec } from 'child_process'; | ||
|
||
const expect = chai.expect; | ||
|
||
function execute(command, callback){ | ||
exec(command, function(error, stdout, stderr) { | ||
callback(error, stdout, stderr); | ||
}); | ||
} | ||
|
||
describe('e2e', () => { | ||
it('an issue should be found when "ws" flag is ON and DS contains WS based issue', done => { | ||
execute('./src/cli.js ./test/fixtures/rules-cases/entity-value-as-entity-name --silent --ws', (error, stdout, stderr) => { | ||
expect(!!error).to.be.true; | ||
expect(error.code).to.be.equal(1); | ||
expect(!!stdout).to.be.true; | ||
|
||
const issues = JSON.parse(stdout); | ||
const issue: {id: string} = <{id: string}>head(issues); | ||
|
||
expect(issues.length).to.be.equals(1); | ||
expect(issue.id).to.be.equals('ENTITY_VALUE_AS_ENTITY_NAME'); | ||
expect(!!stderr).to.be.false; | ||
|
||
done(); | ||
}); | ||
}); | ||
|
||
it('any issue should NOT be found when "ws" flag is OFF and DS contains WS based issue', done => { | ||
execute('./src/cli.js ./test/fixtures/rules-cases/entity-value-as-entity-name --silent', (error, stdout, stderr) => { | ||
expect(!!error).to.be.false; | ||
expect(!!stdout).to.be.false; | ||
expect(!!stderr).to.be.false; | ||
|
||
done(); | ||
}); | ||
}); | ||
}); |