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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user