mirror of
https://github.com/openfaas/faas.git
synced 2025-06-20 04:56:38 +00:00
20
gateway/tests/resources_test.go
Normal file
20
gateway/tests/resources_test.go
Normal file
@ -0,0 +1,20 @@
|
||||
package tests
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/openfaas/faas/gateway/handlers"
|
||||
)
|
||||
|
||||
func Test_ParseMemory(t *testing.T) {
|
||||
value := "512 m"
|
||||
|
||||
val, err := handlers.ParseMemory(value)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
|
||||
if val != 1024*1024*512 {
|
||||
t.Errorf("want: %d got: %d", 1024, val)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user