Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
debomatic-webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
debomatic-webui-admins
debomatic-webui
Commits
54f7c734
Commit
54f7c734
authored
Jul 20, 2014
by
Leo Iannacone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test package status
parent
9f83e487
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
debomatic-webui/test/tests.coffee
debomatic-webui/test/tests.coffee
+18
-3
No files found.
debomatic-webui/test/tests.coffee
View file @
54f7c734
...
@@ -19,7 +19,7 @@ launch_server = () ->
...
@@ -19,7 +19,7 @@ launch_server = () ->
server
.
stdout
.
on
'data'
,
(
data
)
->
console
.
log
(
'
\n
SERVER OUT: '
,
data
.
toString
(
'utf-8'
))
server
.
stdout
.
on
'data'
,
(
data
)
->
console
.
log
(
'
\n
SERVER OUT: '
,
data
.
toString
(
'utf-8'
))
server
.
stderr
.
on
'data'
,
(
data
)
->
console
.
error
(
'
\n
SERVER ERR'
,
data
.
toString
(
'utf-8'
))
server
.
stderr
.
on
'data'
,
(
data
)
->
console
.
error
(
'
\n
SERVER ERR'
,
data
.
toString
(
'utf-8'
))
server
.
on
'exit'
,
(
code
)
->
server
.
on
'exit'
,
(
code
)
->
console
.
error
(
'
child process exited
with code '
+
code
);
console
.
error
(
'
Server exit
with code '
+
code
);
process
.
exit
(
code
)
process
.
exit
(
code
)
...
@@ -79,6 +79,7 @@ class Helper
...
@@ -79,6 +79,7 @@ class Helper
helper
=
new
Helper
()
helper
=
new
Helper
()
launch_server
()
client
=
null
client
=
null
describe
'client'
,
->
describe
'client'
,
->
...
@@ -86,7 +87,7 @@ describe 'client', ->
...
@@ -86,7 +87,7 @@ describe 'client', ->
before
(
->
before
(
->
helper
.
make_distribution
(
'trusty'
)
helper
.
make_distribution
(
'trusty'
)
helper
.
make_distribution
(
'unstable'
)
helper
.
make_distribution
(
'unstable'
)
helper
.
append_json
(
""
)
helper
.
append_json
(
'{"status": "build", "package": "test_1.2.3", "uploader": "", "distribution": "unstable"}'
)
client
=
io
.
connect
(
"http://
#{
config
.
host
}
:
#{
config
.
port
}
"
)
client
=
io
.
connect
(
"http://
#{
config
.
host
}
:
#{
config
.
port
}
"
)
)
)
...
@@ -95,10 +96,16 @@ describe 'client', ->
...
@@ -95,10 +96,16 @@ describe 'client', ->
client
.
on
events
.
broadcast
.
distributions
,
(
data
)
->
client
.
on
events
.
broadcast
.
distributions
,
(
data
)
->
data
.
should
.
be
.
eql
([
'trusty'
,
'unstable'
])
data
.
should
.
be
.
eql
([
'trusty'
,
'unstable'
])
it
'get status'
,
->
it
'get
debomatic
status'
,
->
client
.
on
events
.
broadcast
.
status_debomatic
,
(
data
)
->
client
.
on
events
.
broadcast
.
status_debomatic
,
(
data
)
->
data
.
running
.
should
.
be
.
false
data
.
running
.
should
.
be
.
false
it
'get package status'
,
->
client
.
on
events
.
broadcast
.
status
,
(
data
)
->
data
.
status
.
should
.
be
.
eql
(
'build'
)
data
.
distribution
.
should
.
be
.
eql
(
'unstable'
)
data
.
package
.
should
.
be
.
eql
(
'test_1.2.3'
)
it
'on getting distribution packages'
,
->
it
'on getting distribution packages'
,
->
helper
.
make_package
(
'unstable'
,
'test_1.2.3'
)
helper
.
make_package
(
'unstable'
,
'test_1.2.3'
)
helper
.
make_package
(
'unstable'
,
'test_1.2.4'
)
helper
.
make_package
(
'unstable'
,
'test_1.2.4'
)
...
@@ -141,6 +148,14 @@ describe 'client', ->
...
@@ -141,6 +148,14 @@ describe 'client', ->
helper
.
append_file
(
'unstable'
,
'test_1.2.3'
,
'buildlog'
,
'this is an appending test'
)
helper
.
append_file
(
'unstable'
,
'test_1.2.3'
,
'buildlog'
,
'this is an appending test'
)
describe
'on build package ends'
,
->
it
'should receive a status update'
,
->
str
=
'{"status": "build", "success": true, "package": "test_1.2.3", "uploader": "", "distribution": "unstable"}'
helper
.
append_json
(
str
)
client
.
on
events
.
broadcast
.
status_update
,
(
data
)
->
data
.
success
.
should
.
not
.
be
.
ok
process
.
on
'exit'
,
()
->
process
.
on
'exit'
,
()
->
client
.
disconnect
()
client
.
disconnect
()
helper
.
clean_all
()
helper
.
clean_all
()
server
.
kill
()
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