-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add multi-namespace test for scaling #75
base: master
Are you sure you want to change the base?
feat: Add multi-namespace test for scaling #75
Conversation
Rewrite the scaling tests into a table driven test and add support to running in multiple namespaces. **Testing** ```sh kind create cluster arkade install openfaas --basic-auth=false --clusterrole kubectl create namespace certifier-test kubectl annotate namespace/certifier-test openfaas="1" export CERTIFIER_NAMESPACES=certifier-test kubectl port-forward -n openfaas svc/gateway 8080:8080 & make test-kubernetes ``` Resolves openfaas#70 Signed-off-by: Lucas Roesler <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, few minor comments which are not blocker and can be improved in subsequent PR.
tests/function_helpers_test.go
Outdated
t.Helper() | ||
|
||
// the CLI sdk does not currently support manually scaling | ||
gwURL := resourceURL(t, path.Join("system", "scale-function", name), "") | ||
gwURL := resourceURL(t, path.Join("system", "scale-function", name), fmt.Sprintf("namespace=%s", namespace)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if you have checked latest version of CLI SDK, it already has API for scaling functions https://github.com/openfaas/faas-cli/blob/master/proxy/scale.go
Probably we can use that or make an separate MR to update that.
if fnc.Replicas != minReplicas { | ||
t.Fatalf("got %d replicas, wanted %d", fnc.Replicas, minReplicas) | ||
} | ||
type scalingTestCase struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really Nice refactoring !!
Signed-off-by: Lucas Roesler <[email protected]>
Signed-off-by: Lucas Roesler <[email protected]>
Signed-off-by: Lucas Roesler <[email protected]>
Sorry I missed this. Could you trigger a rebuild since the last 3 commits seem to have failed CI? |
Rewrite the scaling tests into a table driven test and add support to
running in multiple namespaces.
Testing
Resolves #70