Skip to content
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

Test the namespaces listing endpoint #63

Closed
LucasRoesler opened this issue Mar 27, 2021 · 1 comment · Fixed by #64
Closed

Test the namespaces listing endpoint #63

LucasRoesler opened this issue Mar 27, 2021 · 1 comment · Fixed by #64

Comments

@LucasRoesler
Copy link
Member

Each provider that supports multiple namespaces needs to support list available namespaces, the endpoint is /system/namespaces. This should be the first test case we add for multinamespace support as part of #61

https://github.com/openfaas/faas-provider/blob/bc0f26cae70c1b3ba2a595cea8bfb8c04925d5c6/serve.go#L68

For faas-netes the implementation is here https://github.com/openfaas/faas-netes/blob/e5cf64dcf4d01f04636d2ffe736be110981b83c5/pkg/handlers/namespaces.go#L22-L48 It requires deployment with a ClusterRole and annotations added to the permitted namespaces.

We need to be able to confirm both of these cases:

  1. when deployed with multi-namespace support disabled, the endpoint should only return a single namespace, the default namesapce (usually openfaas-fn)
  2. when deployed with multi-namespace support enabled, it should return it should return each of the configured namespaces and it should also include the default namespace.

I don't think it requires writing multiple test cases, rather the ideal situation is that the one test can work to run against deployments/configurations.

@nitishkumar71
Copy link
Member

I will work on this to as next step to support #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants