Github Actions Workflows (#1876)
Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com> Co-authored-by: sahil-lakhwani <sahilakhwani@gmail.com> Co-authored-by: agiwalpooja20 Co-authored-by: abhisheks-infracloud
This commit is contained in:
co-authored by
Vishal
sahil-lakhwani
agiwalpooja20
abhisheks-infracloud
parent
e438df87fa
commit
a68f3edcd4
@@ -51,7 +51,7 @@ get_archive_url_from_package() {
|
||||
|
||||
get_archive_from_storage() {
|
||||
storage_service_url=$1
|
||||
controller_ip=$(kubectl -n $FISSION_NAMESPACE get svc controller -o jsonpath='{...ip}')
|
||||
controller_ip=$CONTROLLER_IP
|
||||
controller_proxy_url=`echo $storage_service_url | sed -e "s/storagesvc.$FISSION_NAMESPACE/$controller_ip\/proxy\/storage/"`
|
||||
log "controller_proxy_url=$controller_proxy_url"
|
||||
http_status=`curl --retry 5 -sw "%{http_code}" $controller_proxy_url -o /dev/null`
|
||||
@@ -109,7 +109,7 @@ main() {
|
||||
|
||||
# archivePruner is set to run every minute for test. In production, its set to run every hour.
|
||||
log "waiting for packages to get recycled"
|
||||
sleep 120
|
||||
sleep 300
|
||||
|
||||
# curl on the archive url
|
||||
get_archive_from_storage $url_1
|
||||
|
||||
@@ -21,7 +21,7 @@ route_succ=route-succ-$TEST_ID
|
||||
route_fail=route-fail-$TEST_ID
|
||||
canary_1=canary-1-$TEST_ID
|
||||
canary_2=canary-2-$TEST_ID
|
||||
|
||||
echo "Exported all the things"
|
||||
cleanup() {
|
||||
log "Cleaning up..."
|
||||
clean_resource_by_id $TEST_ID
|
||||
@@ -53,7 +53,7 @@ success_scenario() {
|
||||
sleep 60
|
||||
|
||||
log "Fire requests to the route"
|
||||
ab -n 300 -c 1 http://$FISSION_ROUTER/$route_succ
|
||||
p=$(ab -n 300 -c 1 http://$FISSION_ROUTER/$route_succ)
|
||||
|
||||
sleep 60
|
||||
|
||||
|
||||
@@ -68,6 +68,6 @@ then
|
||||
log "Failed to update target CPU for the function"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fission fn list
|
||||
timeout 60 bash -c "test_fn $fn 'world'"
|
||||
log "Test PASSED"
|
||||
|
||||
@@ -53,7 +53,6 @@ echo $response | grep -i foo
|
||||
# function to emulate real online traffic. The router
|
||||
# should be able to update cache under this situation.
|
||||
( watch -n1 curl http://$FISSION_ROUTER/$fn ) > /dev/null 2>&1 &
|
||||
pid=$!
|
||||
|
||||
log "Updating function"
|
||||
echo 'module.exports = function(context, callback) { callback(200, "bar!\n"); }' > $tmp_dir/bar.js
|
||||
@@ -68,6 +67,4 @@ response=$(curl http://$FISSION_ROUTER/$fn)
|
||||
log "Checking for valid response again"
|
||||
echo $response | grep -i bar
|
||||
|
||||
kill -15 $pid
|
||||
|
||||
log "All done."
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/bin/bash
|
||||
#test:disabled
|
||||
# this test is disabled only for Kind tests and for GKE/EKS tests should be enabled
|
||||
|
||||
set -euo pipefail
|
||||
source $(dirname $0)/../utils.sh
|
||||
|
||||
@@ -103,7 +106,7 @@ log "Modifying the route by adding host, path, annotations, tls"
|
||||
fission route update --name $routeName --function $functionName --ingressannotation "foo=bar" --ingressrule "$hostName=/foo/bar" --ingresstls "dummy"
|
||||
|
||||
sleep 3
|
||||
checkIngress $routeName $hostName "/foo/bar" "map[foo:bar]" "dummy"
|
||||
checkIngress $routeName $hostName "/foo/bar" '{"foo":"bar"}' "dummy"
|
||||
|
||||
log "Remove ingress annotations, host, rule and tls"
|
||||
fission route update --name $routeName --function $functionName --ingressannotation "-" --ingressrule "-" --ingresstls "-"
|
||||
@@ -127,7 +130,7 @@ fission route create --name $routeName --url $relativeUrl --function $functionNa
|
||||
--ingressrule "*=$wildcardPath"
|
||||
|
||||
sleep 3
|
||||
checkIngress $routeName "" $wildcardPath "map[nginx.ingress.kubernetes.io/ssl-redirect:false nginx.ingress.kubernetes.io/use-regex:true]" ""
|
||||
checkIngress $routeName "" $wildcardPath '{"nginx.ingress.kubernetes.io/ssl-redirect":"false","nginx.ingress.kubernetes.io/use-regex":"true"}' ""
|
||||
timeout 10 bash -c "test_ingress $realPath 'hello, world!'"
|
||||
|
||||
log "Test PASSED"
|
||||
|
||||
@@ -7,12 +7,12 @@ metadata:
|
||||
spec:
|
||||
builder:
|
||||
command: build
|
||||
image: fission/go-builder-1.12:1.7.1
|
||||
image: fission/go-builder-1.12
|
||||
imagepullsecret: ""
|
||||
keeparchive: false
|
||||
poolsize: 3
|
||||
resources: {}
|
||||
runtime:
|
||||
image: fission/go-env-1.12:1.7.1
|
||||
image: fission/go-env-1.12
|
||||
terminationGracePeriod: 5
|
||||
version: 2
|
||||
|
||||
@@ -26,9 +26,6 @@ fi
|
||||
name="go-spec-kubectl"
|
||||
pkgName="go-b4bbb0e0-2d93-47f0-8c4e-eea644eec2a9"
|
||||
|
||||
# cleanup first
|
||||
cleanup
|
||||
|
||||
# apply environment & function
|
||||
kubectl apply -f spec-yaml -R
|
||||
|
||||
@@ -47,4 +44,6 @@ timeout 90 bash -c "waitBuild $pkgName"
|
||||
|
||||
fission fn test --name $name
|
||||
|
||||
log "Test PASSED"
|
||||
cleanup
|
||||
|
||||
log "Test PASSED"
|
||||
@@ -71,6 +71,9 @@ fission route create --function ${fn_secret} --url /${fn_secret} --method GET
|
||||
log "Waiting for router to catch up"
|
||||
sleep 5
|
||||
|
||||
fission fn list
|
||||
kubectl get secrets --all-namespaces
|
||||
kubectl get configmaps --all-namespaces
|
||||
timeout 60 bash -c "checkFunctionResponse ${fn_secret} 'TESTVALUE' 'secret'"
|
||||
|
||||
log "Creating second secret"
|
||||
|
||||
Reference in New Issue
Block a user