Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
9e3d8452
Commit
9e3d8452
authored
May 12, 2015
by
Nikhil Jindal
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7880 from djvirgen/feature/karma-travis-integration
Adds Karma to TravisCI
parents
d75bd8bf
1a784cd4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
1 deletion
+83
-1
.gitignore
.gitignore
+3
-0
.travis.yml
.travis.yml
+4
-0
header.spec.js
...ster/components/dashboard/test/controllers/header.spec.js
+67
-0
karma.conf.js
www/master/karma.conf.js
+8
-1
package.json
www/master/package.json
+1
-0
No files found.
.gitignore
View file @
9e3d8452
...
...
@@ -53,3 +53,6 @@ network_closure.sh
# Web UI
www/master/node_modules/
# Karma output
www/test_out
.travis.yml
View file @
9e3d8452
...
...
@@ -21,8 +21,12 @@ install:
-
GOPATH=$PWD/Godeps/_workspace:$GOPATH go install ./...
-
PATH=$HOME/gopath/bin:./third_party/etcd:$PATH ./hack/verify-gendocs.sh
before_script
:
-
npm install karma karma-junit-reporter karma-phantomjs-launcher karma-jasmine
script
:
-
KUBE_RACE="-race" KUBE_COVER="y" KUBE_GOVERALLS_BIN="$HOME/gopath/bin/goveralls" KUBE_TIMEOUT='-timeout 300s' KUBE_COVERPROCS=8 KUBE_TEST_API_VERSIONS=$KUBE_TEST_API_VERSIONS ./hack/test-go.sh -- -p=2
-
node_modules/karma/bin/karma start www/master/karma.conf.js --single-run --browsers PhantomJS
-
PATH=$HOME/gopath/bin:./third_party/etcd:$PATH ./hack/test-cmd.sh
-
PATH=$HOME/gopath/bin:./third_party/etcd:$PATH KUBE_TEST_API_VERSIONS=$KUBE_TEST_API_VERSIONS KUBE_INTEGRATION_TEST_MAX_CONCURRENCY=4 LOG_LEVEL=4 ./hack/test-integration.sh
...
...
www/master/components/dashboard/test/controllers/header.spec.js
0 → 100644
View file @
9e3d8452
'use strict'
;
describe
(
'header controller'
,
function
()
{
beforeEach
(
module
(
'kubernetesApp.components.dashboard'
));
beforeEach
(
inject
(
function
(
$rootScope
,
$location
,
$controller
)
{
this
.
rootScope
=
$rootScope
;
this
.
scope
=
$rootScope
.
$new
();
this
.
location
=
$location
;
spyOn
(
this
.
location
,
'path'
);
this
.
controller
=
$controller
;
this
.
ctrl
=
this
.
controller
(
'HeaderCtrl'
,
{
$scope
:
this
.
scope
});
this
.
scope
.
$apply
();
}));
describe
(
'subPages'
,
function
()
{
it
(
'is defined'
,
function
()
{
expect
(
this
.
scope
.
subPages
).
not
.
toBeUndefined
();
});
it
(
'is an array'
,
function
()
{
expect
(
Array
.
isArray
(
this
.
scope
.
subPages
)).
toBeTruthy
();
});
it
(
'is not empty'
,
function
()
{
expect
(
this
.
scope
.
subPages
.
length
).
toBeGreaterThan
(
0
);
});
describe
(
'each subPage'
,
function
()
{
it
(
'has a category'
,
function
()
{
this
.
scope
.
subPages
.
forEach
(
function
(
subPage
)
{
expect
(
subPage
.
category
).
toBeTruthy
();
});
});
it
(
'has a name'
,
function
()
{
this
.
scope
.
subPages
.
forEach
(
function
(
subPage
)
{
expect
(
subPage
.
name
).
toBeTruthy
();
});
});
it
(
'has a value'
,
function
()
{
this
.
scope
.
subPages
.
forEach
(
function
(
subPage
)
{
expect
(
subPage
.
value
).
toBeTruthy
();
});
});
});
});
describe
(
'Pages'
,
function
()
{
it
(
'does not change location on first detected change'
,
function
()
{
expect
(
this
.
location
.
path
).
not
.
toHaveBeenCalled
();
});
it
(
'changes location on second detected change'
,
function
()
{
var
_this
=
this
;
this
.
scope
.
$apply
(
function
()
{
_this
.
scope
.
Pages
=
'test_Pages'
;
});
expect
(
this
.
location
.
path
).
toHaveBeenCalledWith
(
'test_Pages'
);
});
});
});
www/master/karma.conf.js
View file @
9e3d8452
...
...
@@ -27,7 +27,14 @@ module.exports = function(config) {
browsers
:
[
'Chrome'
],
plugins
:
[
'karma-chrome-launcher'
,
'karma-firefox-launcher'
,
'karma-jasmine'
,
'karma-junit-reporter'
],
plugins
:
[
'karma-chrome-launcher'
,
'karma-firefox-launcher'
,
'karma-jasmine'
,
'karma-junit-reporter'
,
'karma-story-reporter'
,
'karma-phantomjs-launcher'
],
junitReporter
:
{
outputFile
:
'test_out/unit.xml'
,
suite
:
'unit'
}
...
...
www/master/package.json
View file @
9e3d8452
...
...
@@ -39,6 +39,7 @@
"karma-cli"
:
"0.0.4"
,
"karma-jasmine"
:
"^0.1.5"
,
"karma-junit-reporter"
:
"^0.2.2"
,
"karma-story-reporter"
:
"^0.3.1"
,
"protractor"
:
"^1.1.1"
,
"shelljs"
:
"^0.2.6"
,
"through2"
:
"^0.6.3"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment