webapps.mason.*: new docs and tests
parent
92b43ce108
commit
6a127dc46c
|
@ -0,0 +1,6 @@
|
||||||
|
USING: help.markup help.syntax ;
|
||||||
|
IN: webapps.mason.backend
|
||||||
|
|
||||||
|
HELP: builder
|
||||||
|
{ $class-description "The db table that keeps track of the build status of all build machines." }
|
||||||
|
{ $see-also all-builders } ;
|
|
@ -1,5 +1,5 @@
|
||||||
USING: continuations db io.directories io.files.temp tools.test
|
USING: accessors calendar continuations db io.directories
|
||||||
webapps.mason.backend webapps.utils ;
|
io.files.temp kernel tools.test webapps.mason.backend webapps.utils ;
|
||||||
IN: webapps.mason.backend.tests
|
IN: webapps.mason.backend.tests
|
||||||
|
|
||||||
[ "mason-test.db" temp-file delete-file ] ignore-errors
|
[ "mason-test.db" temp-file delete-file ] ignore-errors
|
||||||
|
@ -17,3 +17,8 @@ IN: webapps.mason.backend.tests
|
||||||
] with-transaction
|
] with-transaction
|
||||||
] with-db
|
] with-db
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
{ f f } [
|
||||||
|
builder new now >>heartbeat-timestamp
|
||||||
|
[ broken? ] [ crashed? ] bi
|
||||||
|
] unit-test
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
USING: tools.test xml.writer ;
|
||||||
|
IN: webapps.mason.downloads
|
||||||
|
|
||||||
|
{ "<p>No machines.</p>" } [
|
||||||
|
{ } builder-list xml>string
|
||||||
|
] unit-test
|
|
@ -0,0 +1,6 @@
|
||||||
|
USING: furnace.actions help.markup help.syntax ;
|
||||||
|
IN: webapps.mason.status-update
|
||||||
|
|
||||||
|
HELP: <status-update-action>
|
||||||
|
{ $values { "action" action } }
|
||||||
|
{ $description "The mason server receives updates from the build machines on this url." } ;
|
|
@ -0,0 +1,15 @@
|
||||||
|
USING: db db.sqlite io.files.temp tools.test webapps.mason.backend
|
||||||
|
webapps.mason.status-update ;
|
||||||
|
IN: webapps.mason.status-update.tests
|
||||||
|
|
||||||
|
! find-builder
|
||||||
|
{
|
||||||
|
T{ builder { host-name "hej" } { os "os" } { cpu "cpu" } }
|
||||||
|
} [
|
||||||
|
"mason-test.db" temp-file <sqlite-db> [
|
||||||
|
[
|
||||||
|
init-mason-db
|
||||||
|
"hej" "os" "cpu" find-builder
|
||||||
|
] with-transaction
|
||||||
|
] with-db
|
||||||
|
] unit-test
|
|
@ -0,0 +1,12 @@
|
||||||
|
USING: accessors kernel namespaces present tools.test urls
|
||||||
|
webapps.mason.backend webapps.mason.utils ;
|
||||||
|
IN: webapps.mason.utils.tests
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
"http://builds.factorcode.org/report?os=the-os&cpu=the-cpu"
|
||||||
|
} [
|
||||||
|
URL" /" url set
|
||||||
|
builder new "the-os" >>os "the-cpu" >>cpu report-url
|
||||||
|
present
|
||||||
|
] unit-test
|
Loading…
Reference in New Issue