Skip to content

-namespacedMan issue in e2e testing #1908

@odra

Description

@odra

Bug Report

What did you do?

Tried to run e2e with this command: operator-sdk test local ./test/e2e --go-test-flags "-v" --image docker.io/odranoel/image:latest

What did you expect to see?

The test output

What did you see instead? Under which circumstances?

The test never starts and I get this error:

INFO[0000] Testing operator locally.                    
flag provided but not defined: -namespacedMan
Usage of /tmp/go-build888548150/b001/e2e.test:
  -test.bench regexp
    	run only benchmarks matching regexp
  -test.benchmem
    	print memory allocations for benchmarks
  -test.benchtime d
    	run each benchmark for duration d (default 1s)
  -test.blockprofile file
    	write a goroutine blocking profile to file
  -test.blockprofilerate rate
    	set blocking profile rate (see runtime.SetBlockProfileRate) (default 1)
  -test.count n
    	run tests and benchmarks n times (default 1)
  -test.coverprofile file
    	write a coverage profile to file
  -test.cpu list
    	comma-separated list of cpu counts to run each test with
  -test.cpuprofile file
    	write a cpu profile to file
  -test.failfast
    	do not start new tests after the first test failure
  -test.list regexp
    	list tests, examples, and benchmarks matching regexp then exit
  -test.memprofile file
    	write an allocation profile to file
  -test.memprofilerate rate
    	set memory allocation profiling rate (see runtime.MemProfileRate)
  -test.mutexprofile string
    	write a mutex contention profile to the named file after execution
  -test.mutexprofilefraction int
    	if >= 0, calls runtime.SetMutexProfileFraction() (default 1)
  -test.outputdir dir
    	write profiles to dir
  -test.parallel n
    	run at most n tests in parallel (default 8)
  -test.run regexp
    	run only tests and examples matching regexp
  -test.short
    	run smaller test suite to save time
  -test.testlogfile file
    	write test action log to file (for use only by cmd/go)
  -test.timeout d
    	panic test binary after duration d (default 0, timeout disabled)
  -test.trace file
    	write an execution trace to file
  -test.v
    	verbose: print additional output
FAIL	github.com/integr8ly/erd-operator/test/e2e	0.009s
Error: failed to build test binary: (failed to exec []string{"go", "test", "./test/e2e/...", "-namespacedMan", "/tmp/namespaced-manifest.yaml042009761", "-globalMan", "/tmp/global-manifest.yaml991821708", "-root", "/home/lrossett/Work/go/src/github.com/integr8ly/erd-operator", "-v"}: exit status 1)
Usage:
  operator-sdk test local <path to tests directory> [flags]

Flags:
      --debug                         Enable debug-level logging
      --global-manifest string        Path to manifest for Global resources (e.g. CRD manifests)
      --go-test-flags string          Additional flags to pass to go test
  -h, --help                          help for local
      --image string                  Use a different operator image from the one specified in the namespaced manifest
      --kubeconfig string             Kubeconfig path
      --local-operator-flags string   The flags that the operator needs (while using --up-local). Example: "--flag1 value1 --flag2=value2"
      --molecule-test-flags string    Additional flags to pass to molecule test
      --namespace string              If non-empty, single namespace to run tests in
      --namespaced-manifest string    Path to manifest for per-test, namespaced resources (e.g. RBAC and Operator manifest)
      --no-setup                      Disable test resource creation
      --up-local                      Enable running operator locally with go run instead of as an image in the cluster

Global Flags:
      --verbose   Enable verbose logging

Environment

  • operator-sdk version:
operator-sdk version: v0.9.0, commit: 560208dc998de497bbf59fea1b63426aec430934
  • go version:
go version go1.12.4 linux/amd64
  • Kubernetes version information:
Client Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.1", GitCommit:"b7394102d6ef778017f2ca4046abbaa23b88c290", GitTreeState:"clean", BuildDate:"2019-04-08T17:11:31Z", GoVersion:"go1.12.1", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.4+b758672", GitCommit:"b758672", GitTreeState:"clean", BuildDate:"2019-08-29T23:00:34Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}

  • Kubernetes cluster kind: openshift

  • Are you writing your operator in ansible, helm, or go? go

Possible Solution

Additional context
Add any other context about the problem here.

Metadata

Metadata

Labels

kind/bugCategorizes issue or PR as related to a bug.triage/supportIndicates an issue that is a support question.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions