feat: Add multi-namespace test for scaling#75
Open
LucasRoesler wants to merge 4 commits intoopenfaas:masterfrom
Open
feat: Add multi-namespace test for scaling#75LucasRoesler wants to merge 4 commits intoopenfaas:masterfrom
LucasRoesler wants to merge 4 commits intoopenfaas:masterfrom
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 <roesler.lucas@gmail.com>
viveksyngh
approved these changes
Jun 23, 2021
Contributor
viveksyngh
left a comment
There was a problem hiding this comment.
LGTM, few minor comments which are not blocker and can be improved in subsequent PR.
tests/function_helpers_test.go
Outdated
|
|
||
| // 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)) |
Contributor
There was a problem hiding this comment.
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 { |
Contributor
There was a problem hiding this comment.
Really Nice refactoring !!
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
Member
|
Sorry I missed this. Could you trigger a rebuild since the last 3 commits seem to have failed CI? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite the scaling tests into a table driven test and add support to
running in multiple namespaces.
Testing
Resolves #70