Vojtech Szocs has posted comments on this change. Change subject: ovirtjs: New project (draft) ......................................................................
Patch Set 2: New patchset with following major changes: * improved Gruntfile, added infra for running smoke tests * added SinonJS as npm dependency for "fake XHR" support in tests * Lodash is now pulled as npm dependency, removed WebJar stuff from pom.xml * JSHint is still disabled because it trips over ES6 "import * as" syntax, we'll enable it once JSHint fixes this issue * introduced constants.js module that exports commonly used constants * added ovirt.init API that returns Promise to initialize oVirtJS (top-level resource collection detection) * main.js now registers "ovirt" global variable (no need to System.get() main module) * Http.send now returns Promise (no need for onSuccess/onError callbacks) Reworked test code structure: * src/test/*.js (anything right under test dir) = common test code * src/test/unit/**/*Spec.js = unit tests * src/test/smoke/**/*Spec.js = smoke tests Currently, Grunt "test" task executes unit tests only, smoke tests need to be run via "testSmoke" task. In future, we might consider executing both kinds of tests during Grunt "test" task. This is because smoke tests, even though integration-like in nature, fake Engine HTTP requests/responses and therefore don't require real Engine instance running. As a result, smoke tests should be fast and run alongside unit tests. See HttpSpec for example on how to write test that uses fake XHR to simulate real HTTP server. -- To view, visit http://gerrit.ovirt.org/33720 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2646646bc880446aa3035dd951e65c9af81933a1 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: Alexander Wels <aw...@redhat.com> Gerrit-Reviewer: Einav Cohen <eco...@redhat.com> Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Tomas Jelinek <tjeli...@redhat.com> Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches