Updated tests
This commit is contained in:
parent
48e03c18b8
commit
4df80aa541
|
@ -264,9 +264,9 @@ class FunctionsV1
|
|||
|
||||
$exitCode = Console::execute("docker run \
|
||||
-d \
|
||||
--cpus=1 \
|
||||
--memory=50m \
|
||||
--memory-swap=50m \
|
||||
--cpus=4 \
|
||||
--memory=128m \
|
||||
--memory-swap=128m \
|
||||
--rm \
|
||||
--name={$container} \
|
||||
--label appwrite-type=function \
|
||||
|
|
2
public/dist/scripts/app-all.js
vendored
2
public/dist/scripts/app-all.js
vendored
|
@ -2625,7 +2625,7 @@ return value+" "+unit+" "+direction;}).add("ms2hum",function($value){let temp=$v
|
|||
(hours?hours+"h ":"")+
|
||||
(minutes?minutes+"m ":"")+
|
||||
Number.parseFloat(seconds).toFixed(0)+"s");}
|
||||
return"< 1s";}).add("seconds2hum",function($value){var seconds=($value).toFixed(2);var minutes=($value/(60)).toFixed(1);var hours=($value/(60*60)).toFixed(1);var days=($value/(60*60*24)).toFixed(1);if(seconds<60){return seconds+"s";}else if(minutes<60){return minutes+"m";}else if(hours<24){return hours+"h";}else{return days+"d"}}).add("markdown",function($value,markdown){return markdown.render($value);}).add("pageCurrent",function($value,env){return Math.ceil(parseInt($value||0)/env.PAGING_LIMIT)+1;}).add("pageTotal",function($value,env){let total=Math.ceil(parseInt($value||0)/env.PAGING_LIMIT);return total?total:1;}).add("humanFileSize",function($value){if(!$value){return 0;}
|
||||
return"< 1s";}).add("seconds2hum",function($value){var seconds=($value).toFixed(3);var minutes=($value/(60)).toFixed(1);var hours=($value/(60*60)).toFixed(1);var days=($value/(60*60*24)).toFixed(1);if(seconds<60){return seconds+"s";}else if(minutes<60){return minutes+"m";}else if(hours<24){return hours+"h";}else{return days+"d"}}).add("markdown",function($value,markdown){return markdown.render($value);}).add("pageCurrent",function($value,env){return Math.ceil(parseInt($value||0)/env.PAGING_LIMIT)+1;}).add("pageTotal",function($value,env){let total=Math.ceil(parseInt($value||0)/env.PAGING_LIMIT);return total?total:1;}).add("humanFileSize",function($value){if(!$value){return 0;}
|
||||
let thresh=1000;if(Math.abs($value)<thresh){return $value+" B";}
|
||||
let units=["kB","MB","GB","TB","PB","EB","ZB","YB"];let u=-1;do{$value/=thresh;++u;}while(Math.abs($value)>=thresh&&u<units.length-1);return($value.toFixed(1)+'<span class="text-size-small unit">'+
|
||||
units[u]+"</span>");}).add("statsTotal",function($value){if(!$value){return 0;}
|
||||
|
|
2
public/dist/scripts/app.js
vendored
2
public/dist/scripts/app.js
vendored
|
@ -263,7 +263,7 @@ return value+" "+unit+" "+direction;}).add("ms2hum",function($value){let temp=$v
|
|||
(hours?hours+"h ":"")+
|
||||
(minutes?minutes+"m ":"")+
|
||||
Number.parseFloat(seconds).toFixed(0)+"s");}
|
||||
return"< 1s";}).add("seconds2hum",function($value){var seconds=($value).toFixed(2);var minutes=($value/(60)).toFixed(1);var hours=($value/(60*60)).toFixed(1);var days=($value/(60*60*24)).toFixed(1);if(seconds<60){return seconds+"s";}else if(minutes<60){return minutes+"m";}else if(hours<24){return hours+"h";}else{return days+"d"}}).add("markdown",function($value,markdown){return markdown.render($value);}).add("pageCurrent",function($value,env){return Math.ceil(parseInt($value||0)/env.PAGING_LIMIT)+1;}).add("pageTotal",function($value,env){let total=Math.ceil(parseInt($value||0)/env.PAGING_LIMIT);return total?total:1;}).add("humanFileSize",function($value){if(!$value){return 0;}
|
||||
return"< 1s";}).add("seconds2hum",function($value){var seconds=($value).toFixed(3);var minutes=($value/(60)).toFixed(1);var hours=($value/(60*60)).toFixed(1);var days=($value/(60*60*24)).toFixed(1);if(seconds<60){return seconds+"s";}else if(minutes<60){return minutes+"m";}else if(hours<24){return hours+"h";}else{return days+"d"}}).add("markdown",function($value,markdown){return markdown.render($value);}).add("pageCurrent",function($value,env){return Math.ceil(parseInt($value||0)/env.PAGING_LIMIT)+1;}).add("pageTotal",function($value,env){let total=Math.ceil(parseInt($value||0)/env.PAGING_LIMIT);return total?total:1;}).add("humanFileSize",function($value){if(!$value){return 0;}
|
||||
let thresh=1000;if(Math.abs($value)<thresh){return $value+" B";}
|
||||
let units=["kB","MB","GB","TB","PB","EB","ZB","YB"];let u=-1;do{$value/=thresh;++u;}while(Math.abs($value)>=thresh&&u<units.length-1);return($value.toFixed(1)+'<span class="text-size-small unit">'+
|
||||
units[u]+"</span>");}).add("statsTotal",function($value){if(!$value){return 0;}
|
||||
|
|
|
@ -97,7 +97,7 @@ window.ls.filter
|
|||
})
|
||||
.add("seconds2hum", function($value) {
|
||||
|
||||
var seconds = ($value).toFixed(2);
|
||||
var seconds = ($value).toFixed(3);
|
||||
|
||||
var minutes = ($value / (60)).toFixed(1);
|
||||
|
||||
|
|
|
@ -191,9 +191,9 @@ class FunctionsConsoleServerTest extends Scope
|
|||
$this->assertEquals(201, $tag['headers']['status-code']);
|
||||
$this->assertNotEmpty($tag['body']['$id']);
|
||||
$this->assertIsInt($tag['body']['dateCreated']);
|
||||
$this->assertEquals('node ./test.js', $tag['body']['command']);
|
||||
$this->assertEquals('php function.php', $tag['body']['command']);
|
||||
$this->assertStringStartsWith('/storage/functions/app-', $tag['body']['codePath']);
|
||||
$this->assertEquals(521, $tag['body']['codeSize']);
|
||||
$this->assertEquals(751, $tag['body']['codeSize']);
|
||||
|
||||
/**
|
||||
* Test for FAILURE
|
||||
|
|
Loading…
Reference in a new issue