Currently the operator-sdk test command will create a new namespace for each test-case or context.
https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#test
We should allow users to specify a pre-defined namespace to use for running all their tests, e.g:
operator-sdk test --namespace=<namespace> -t ./test/e2e
This should restrict all contexts to use the specified namespace.
One use case for this is testing operators that require a ClusterRole and ClusterRoleBinding.
For a ClusterRoleBinding manifest you have to specify the namespace to bind to. Unlike a RoleBinding which is bound to the namespace it's created in.
Currently there is no way for a user to predict the namespace that each test context will generate (in the format TestName-Timestamp).
We can add the namespace flag to operator-sdk test local after the in-cluster command operator-sdk test cluster is merged #469
/cc @aravindhp @AlexNPavel
Currently the
operator-sdk testcommand will create a new namespace for each test-case or context.https://github.com/operator-framework/operator-sdk/blob/master/doc/sdk-cli-reference.md#test
We should allow users to specify a pre-defined namespace to use for running all their tests, e.g:
This should restrict all contexts to use the specified namespace.
One use case for this is testing operators that require a ClusterRole and ClusterRoleBinding.
For a ClusterRoleBinding manifest you have to specify the namespace to bind to. Unlike a RoleBinding which is bound to the namespace it's created in.
Currently there is no way for a user to predict the namespace that each test context will generate (in the format
TestName-Timestamp).We can add the namespace flag to
operator-sdk test localafter the in-cluster commandoperator-sdk test clusteris merged #469/cc @aravindhp @AlexNPavel