Move builds to package level (#297)

Introduce _Archives_ as a type to reference arbitrary blobs.

_Packages_ are a pair of Source and Deployment archives. Packages have an environment reference.

Functions reference a package. Multiple functions can reference the same package.
This commit is contained in:
Soam Vasani
2017-09-08 14:19:39 -07:00
committed by GitHub
parent 9d7bd49338
commit f2091d0d80
7 changed files with 142 additions and 129 deletions
+5 -3
View File
@@ -81,8 +81,10 @@ func TestFunctionApi(t *testing.T) {
Namespace: api.NamespaceDefault,
},
Spec: fission.FunctionSpec{
EnvironmentName: "nodejs",
Deployment: fission.FunctionPackageRef{
Environment: fission.EnvironmentReference{
Name: "nodejs",
},
Package: fission.FunctionPackageRef{
FunctionName: "xxx",
},
},
@@ -99,7 +101,7 @@ func TestFunctionApi(t *testing.T) {
_, err = g.client.FunctionCreate(testFunc)
assertNameReuseFailure(err, "function")
testFunc.Spec.Deployment.FunctionName = "yyy"
testFunc.Spec.Package.FunctionName = "yyy"
_, err = g.client.FunctionUpdate(testFunc)
panicIf(err)