mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 15:27:47 -02:30
Get tests running again
This commit is contained in:
8
Makefile
8
Makefile
@@ -86,7 +86,7 @@ MOCK_CFG ?=
|
|||||||
develop refresh adduser syncdb migrate dbchange dbshell runserver celeryd \
|
develop refresh adduser syncdb migrate dbchange dbshell runserver celeryd \
|
||||||
receiver test test_coverage coverage_html ui_analysis_report test_ui test_jenkins dev_build \
|
receiver test test_coverage coverage_html ui_analysis_report test_ui test_jenkins dev_build \
|
||||||
release_build release_clean sdist rpmtar mock-rpm mock-srpm rpm-sign \
|
release_build release_clean sdist rpmtar mock-rpm mock-srpm rpm-sign \
|
||||||
deb deb-src debian reprepro setup_tarball sync_ui \
|
deb deb-src debian reprepro setup_tarball sync_ui node-tests \
|
||||||
virtualbox-ovf virtualbox-centos-7 virtualbox-centos-6
|
virtualbox-ovf virtualbox-centos-7 virtualbox-centos-6
|
||||||
|
|
||||||
# Remove setup build files
|
# Remove setup build files
|
||||||
@@ -333,8 +333,10 @@ awx/ui/%: node_modules clean-ui Brocfile.js bower.json
|
|||||||
$(BROCCOLI_BIN) build $@ -- $(UI_FLAGS)
|
$(BROCCOLI_BIN) build $@ -- $(UI_FLAGS)
|
||||||
|
|
||||||
testjs: UI_FLAGS=--node-tests --no-concat --no-styles $(EXTRA_UI_FLAGS)
|
testjs: UI_FLAGS=--node-tests --no-concat --no-styles $(EXTRA_UI_FLAGS)
|
||||||
testjs: awx/ui/build_test
|
testjs: awx/ui/build_test node-tests
|
||||||
$(MOCHA_BIN) --full-trace $(shell find awx/ui/build_test -name '*-test.js')
|
|
||||||
|
node-tests:
|
||||||
|
NODE_PATH=awx/ui/build_test $(MOCHA_BIN) --full-trace $(shell find awx/ui/build_test -name '*-test.js')
|
||||||
|
|
||||||
devjs: awx/ui/static
|
devjs: awx/ui/static
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import {describeModule} from '../support/describe-module';
|
import {describeModule} from '../support/describe-module';
|
||||||
import '../../src/shared/Utilities';
|
import 'shared/Utilities';
|
||||||
import '../../src/shared/RestServices';
|
import 'shared/RestServices';
|
||||||
import JobStatusGraph from '../../src/dashboard/graphs/job-status/main';
|
import JobStatusGraph from 'dashboard/graphs/job-status/main';
|
||||||
|
|
||||||
var resizeHandler = sinon.spy();
|
var resizeHandler = sinon.spy();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import featuresController from '../../src/shared/features/features.controller';
|
import featuresController from 'shared/features/features.controller';
|
||||||
|
|
||||||
describe('featuresController', function() {
|
describe('featuresController', function() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import features from '../../src/shared/features/main';
|
import features from 'shared/features/main';
|
||||||
import {describeModule} from '../support/describe-module';
|
import {describeModule} from '../support/describe-module';
|
||||||
|
|
||||||
//test that it returns features, as well as test that it is returned in rootScope
|
//test that it returns features, as well as test that it is returned in rootScope
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import jobTemplates from '../../src/job-templates/main';
|
import jobTemplates from 'job-templates/main';
|
||||||
import {describeModule} from '../support/describe-module';
|
import {describeModule} from '../support/describe-module';
|
||||||
|
|
||||||
describeModule(jobTemplates.name)
|
describeModule(jobTemplates.name)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import {describeModule} from '../support/describe-module';
|
import {describeModule} from '../support/describe-module';
|
||||||
import mod from '../../src/shared/multi-select-list/main';
|
import mod from 'shared/multi-select-list/main';
|
||||||
|
|
||||||
describeModule(mod.name)
|
describeModule(mod.name)
|
||||||
.testDirective('multiSelectList', function(test) {
|
.testDirective('multiSelectList', function(test) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import {describeModule} from '../support/describe-module';
|
import {describeModule} from '../support/describe-module';
|
||||||
import mod from '../../src/shared/multi-select-list/main';
|
import mod from 'shared/multi-select-list/main';
|
||||||
|
|
||||||
var mockController = {
|
var mockController = {
|
||||||
selectAll: sinon.spy(),
|
selectAll: sinon.spy(),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import {describeModule} from '../support/describe-module';
|
import {describeModule} from '../support/describe-module';
|
||||||
import JobStatusGraph from '../../src/dashboard/graphs/job-status/main';
|
import JobStatusGraph from 'dashboard/graphs/job-status/main';
|
||||||
|
|
||||||
var processErrors = sinon.spy();
|
var processErrors = sinon.spy();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import '../../src/shared/main';
|
import 'shared/main';
|
||||||
|
|
||||||
describe('LodashAsPromised', function() {
|
describe('LodashAsPromised', function() {
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import '../../support/node';
|
import '../../support/node';
|
||||||
|
|
||||||
import compareFacts from '../../../src/system-tracking/compare-facts/flat';
|
import compareFacts from 'system-tracking/compare-facts/flat';
|
||||||
|
|
||||||
// This makes this test runnable in node OR karma. The sheer
|
// This makes this test runnable in node OR karma. The sheer
|
||||||
// number of times I had to run this test made the karma
|
// number of times I had to run this test made the karma
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import '../../support/node';
|
import '../../support/node';
|
||||||
|
|
||||||
import compareFacts from '../../../src/system-tracking/compare-facts/nested';
|
import compareFacts from 'system-tracking/compare-facts/nested';
|
||||||
|
|
||||||
describe('CompareFacts.Nested', function() {
|
describe('CompareFacts.Nested', function() {
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import '../support/node';
|
import '../support/node';
|
||||||
|
|
||||||
import systemTracking from '../../src/system-tracking/data-services/main';
|
import systemTracking from 'system-tracking/data-services/main';
|
||||||
import {describeModule} from '../support/describe-module';
|
import {describeModule} from '../support/describe-module';
|
||||||
import moment from '../../src/shared/moment/moment';
|
import moment from 'shared/moment/moment';
|
||||||
|
|
||||||
describeModule(systemTracking.name)
|
describeModule(systemTracking.name)
|
||||||
.testService('factScanDataService', function(test, restStub) {
|
.testService('factScanDataService', function(test, restStub) {
|
||||||
|
|||||||
24
testem.yml
24
testem.yml
@@ -1,25 +1,23 @@
|
|||||||
---
|
---
|
||||||
framework: mocha
|
framework: mocha
|
||||||
cwd: awx/ui/
|
cwd: awx/ui/client
|
||||||
port: 7358
|
port: 7358
|
||||||
src_files:
|
src_files:
|
||||||
- client/**/*.js
|
- src/**/*.js
|
||||||
- client/**/*.js
|
|
||||||
- tests/**/*.js
|
- tests/**/*.js
|
||||||
serve_files:
|
serve_files:
|
||||||
- static/tower.concat.js
|
- ../static/tower.concat.js
|
||||||
- static/tests/**/*.js
|
- ../static/tests/**/*.js
|
||||||
- static/tests/unit.js
|
- ../static/tests/unit.js
|
||||||
unsafe_file_serving: true
|
unsafe_file_serving: true
|
||||||
test_page: tests.html
|
test_page: tests.html
|
||||||
disable_watching: true
|
disable_watching: true
|
||||||
routes:
|
routes:
|
||||||
/awx/ui/static: /static
|
/static: ../static
|
||||||
/tests.html: ../../packaging/grunt/testem.mustache
|
/tests.html: ../../../packaging/grunt/testem.mustache
|
||||||
/test-loader.js: client/lib/ember-cli-test-loader/test-loader.js
|
/test-loader.js: lib/ember-cli-test-loader/test-loader.js
|
||||||
/vendor: ../../node_modules
|
/vendor: ../../../node_modules
|
||||||
/angular-mocks.js: static/lib/angular-mocks/angular-mocks.js
|
/angular-mocks.js: lib/angular-mocks/angular-mocks.js
|
||||||
/templates.js: static/templates.js
|
|
||||||
reporter: xunit
|
reporter: xunit
|
||||||
launch_in_dev:
|
launch_in_dev:
|
||||||
- Mocha
|
- Mocha
|
||||||
@@ -27,4 +25,4 @@ launch_in_ci:
|
|||||||
- PhantomJS
|
- PhantomJS
|
||||||
launchers:
|
launchers:
|
||||||
Mocha:
|
Mocha:
|
||||||
command: npm test
|
command: make node-tests
|
||||||
|
|||||||
Reference in New Issue
Block a user