cybozu-go / accurate

Kubernetes controller for multi-tenancy. It propagates resources between namespaces accurately and allows tenant users to create/delete sub-namespaces.
https://cybozu-go.github.io/accurate/
Apache License 2.0
38 stars 5 forks source link

Flaky test: secrets "bar" not found in namespace controller test #25

Closed zoetrope closed 2 years ago

zoetrope commented 2 years ago

Describe the bug

Secret "bar" sometimes not found in the namespace controller test.

https://github.com/cybozu-go/accurate/runs/3891153514?check_suite_focus=true

• Failure [0.614 seconds]
Namespace controller
/home/runner/work/accurate/accurate/controllers/namespace_controller_test.go:39
  should implement template namespace correctly [It]
  /home/runner/work/accurate/accurate/controllers/namespace_controller_test.go:84

  Unexpected error:
      <*errors.StatusError | 0xc000a69ea0>: {
          ErrStatus: {
              TypeMeta: {Kind: "", APIVersion: ""},
              ListMeta: {
                  SelfLink: "",
                  ResourceVersion: "",
                  Continue: "",
                  RemainingItemCount: nil,
              },
              Status: "Failure",
              Message: "secrets \"bar\" not found",
              Reason: "NotFound",
              Details: {Name: "bar", Group: "", Kind: "secrets", UID: "", Causes: nil, RetryAfterSeconds: 0},
              Code: 404,
          },
      }
      secrets "bar" not found
  occurred

  /home/runner/work/accurate/accurate/controllers/namespace_controller_test.go:199
------------------------------
SSSTEP: tearing down the test environment

Summarizing 1 Failure:

[Fail] Namespace controller [It] should implement template namespace correctly 
/home/runner/work/accurate/accurate/controllers/namespace_controller_test.go:199

Environments

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Additional context Add any other context about the problem here.

ymmt2005 commented 2 years ago

This might have been caused by the bug fixed in #29.