feat: add 15 auto-test functions + destroy-test + versioning rules
Batch 1: ok, echo, error, cpu, slow Batch 2: jsonout, recurse, bigdata, math, timestamp Batch 3: multiline, encoding, nested, memory, chain Tests: create, update (code_hash), idempotency, destroy, re-create All 15 functions verified via curl with JWT auth
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
def main():
|
||||
return "destroy-test-alive"
|
||||
@@ -0,0 +1,39 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
fission = {
|
||||
source = "nail/fission"
|
||||
version = "~> 0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "fission" {
|
||||
kubeconfig_path = "/home/naeel/.kube/config"
|
||||
namespace = "default"
|
||||
}
|
||||
|
||||
resource "fission_environment" "python" {
|
||||
name = "tf-destroy-test-env"
|
||||
image = "ghcr.io/fission/python-env"
|
||||
version = 3
|
||||
}
|
||||
|
||||
resource "fission_package" "pkg" {
|
||||
name = "tf-destroy-test-pkg"
|
||||
environment = fission_environment.python.name
|
||||
source_dir = "${path.module}/code"
|
||||
}
|
||||
|
||||
resource "fission_function" "fn" {
|
||||
name = "tf-destroy-test-fn"
|
||||
environment = fission_environment.python.name
|
||||
package_name = fission_package.pkg.name
|
||||
entrypoint = "main.main"
|
||||
}
|
||||
|
||||
resource "fission_http_trigger" "route" {
|
||||
name = "tf-destroy-test-route"
|
||||
function = fission_function.fn.name
|
||||
url = "/destroy-test"
|
||||
methods = ["GET"]
|
||||
}
|
||||
Reference in New Issue
Block a user