Base64 encode the code in json objects.
This will make the API easier for clients. Also add a ?raw=1 flag to the function GET API, to get just the code of the function.
This commit is contained in:
@@ -56,6 +56,10 @@ func TestFunctionApi(t *testing.T) {
|
||||
uid1 := m.Uid
|
||||
log.Printf("Created function %v: %v", m.Name, m.Uid)
|
||||
|
||||
code, err := g.client.FunctionGetRaw(m)
|
||||
panicIf(err)
|
||||
assert(string(code) == testFunc.Code, "code from FunctionGetRaw must match created function")
|
||||
|
||||
testFunc.Code = "code2"
|
||||
m, err = g.client.FunctionUpdate(testFunc)
|
||||
panicIf(err)
|
||||
|
||||
Reference in New Issue
Block a user