[id="osdk-cli-reference-test_{context}"] = test The `operator-sdk test` command can test the Operator locally. == local The `local` subcommand runs Go tests built using the Operator SDK's test framework locally. .`test local` arguments [options="header",cols="1,3"] |=== |Arguments |Description |`` (string) |Location of e2e test files (e.g., `./test/e2e/`). |=== .`test local` flags [options="header",cols="1,3"] |=== |Flags |Description |`--kubeconfig` (string) |Location of `kubeconfig` for a cluster. Default: `~/.kube/config`. |`--global-manifest` (string) |Path to manifest for global resources. Default: `deploy/crd.yaml`. |`--namespaced-manifest` (string) |Path to manifest for per-test, namespaced resources. Default: combines `deploy/service_account.yaml`, `deploy/rbac.yaml`, and `deploy/operator.yaml`. |`--namespace` (string) |If non-empty, a single namespace to run tests in (e.g., `operator-test`). Default: `""` |`--go-test-flags` (string) |Extra arguments to pass to `go test` (e.g., `-f "-v -parallel=2"`). |`--up-local` |Enable running the Operator locally with `go run` instead of as an image in the cluster. |`--no-setup` |Disable test resource creation. |`--image` (string) |Use a different Operator image from the one specified in the namespaced manifest. |`-h, --help` |Usage help output. |=== .Example output ---- $ operator-sdk test local ./test/e2e/ # Output: ok github.com/operator-framework/operator-sdk-samples/memcached-operator/test/e2e 20.410s ----