From 4e3c9696cf0051f8d8bffd901d17f1488bb6bd88 Mon Sep 17 00:00:00 2001 From: zhanghongtong Date: Wed, 12 Jan 2022 18:01:58 +0800 Subject: [PATCH] test: rename suite path Signed-off-by: zhanghongtong --- .github/workflows/cts.yaml | 2 +- .github/workflows/test.yaml | 2 +- {suites/v1beta1 => controllers_suite}/acl_test.go | 2 +- {suites/v1beta1 => controllers_suite}/listener_test.go | 2 +- {suites/v1beta1 => controllers_suite}/modules_test.go | 2 +- {suites/v1beta1 => controllers_suite}/plugins_test.go | 2 +- {suites/v1beta1 => controllers_suite}/rbac_test.go | 2 +- {suites/v1beta1 => controllers_suite}/statefulset_test.go | 2 +- {suites/v1beta1 => controllers_suite}/suites_test.go | 6 +++--- 9 files changed, 11 insertions(+), 11 deletions(-) rename {suites/v1beta1 => controllers_suite}/acl_test.go (98%) rename {suites/v1beta1 => controllers_suite}/listener_test.go (99%) rename {suites/v1beta1 => controllers_suite}/modules_test.go (99%) rename {suites/v1beta1 => controllers_suite}/plugins_test.go (98%) rename {suites/v1beta1 => controllers_suite}/rbac_test.go (99%) rename {suites/v1beta1 => controllers_suite}/statefulset_test.go (98%) rename {suites/v1beta1 => controllers_suite}/suites_test.go (97%) diff --git a/.github/workflows/cts.yaml b/.github/workflows/cts.yaml index a99a6c121..b1b3db708 100644 --- a/.github/workflows/cts.yaml +++ b/.github/workflows/cts.yaml @@ -78,7 +78,7 @@ jobs: timeout-minutes: 15 run: | set -euo pipefail - while [ $(kubectl get pods -l "control-plane=controller-manager" -n emqx-operator-system -o json | jq '.items[0].status.containerStatuses[] | select(.ready==true) | .containerID' | wc -l) != 2 ]; do + while [ "$(kubectl get pods -l "control-plane=controller-manager" -n emqx-operator-system -o json | jq '.items[0].status.containerStatuses[] | select(.ready==true) | .containerID')" = "" ]; do echo "waiting operator controller pod running" sleep 1 done diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 08302d656..631da8a65 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -79,7 +79,7 @@ jobs: timeout-minutes: 10 run: | set -euo pipefail - while [ $(kubectl get pods -l "control-plane=controller-manager" -n emqx-operator-system -o json | jq '.items[0].status.containerStatuses[] | select(.ready==true) | .containerID' | wc -l) != 2 ]; do + while [ "$(kubectl get pods -l "control-plane=controller-manager" -n emqx-operator-system -o json | jq '.items[0].status.containerStatuses[] | select(.ready==true) | .containerID')" = "" ]; do echo "waiting operator controller pod running" sleep 1 done diff --git a/suites/v1beta1/acl_test.go b/controllers_suite/acl_test.go similarity index 98% rename from suites/v1beta1/acl_test.go rename to controllers_suite/acl_test.go index fa78be5ca..67ce02127 100644 --- a/suites/v1beta1/acl_test.go +++ b/controllers_suite/acl_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package suites_test +package controller_suite_test import ( "context" diff --git a/suites/v1beta1/listener_test.go b/controllers_suite/listener_test.go similarity index 99% rename from suites/v1beta1/listener_test.go rename to controllers_suite/listener_test.go index 2debe80d7..5792661b5 100644 --- a/suites/v1beta1/listener_test.go +++ b/controllers_suite/listener_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package suites_test +package controller_suite_test import ( "context" diff --git a/suites/v1beta1/modules_test.go b/controllers_suite/modules_test.go similarity index 99% rename from suites/v1beta1/modules_test.go rename to controllers_suite/modules_test.go index 7c02ff0c4..d8638633f 100644 --- a/suites/v1beta1/modules_test.go +++ b/controllers_suite/modules_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package suites_test +package controller_suite_test import ( "context" diff --git a/suites/v1beta1/plugins_test.go b/controllers_suite/plugins_test.go similarity index 98% rename from suites/v1beta1/plugins_test.go rename to controllers_suite/plugins_test.go index d3e653429..6b2f56b60 100644 --- a/suites/v1beta1/plugins_test.go +++ b/controllers_suite/plugins_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package suites_test +package controller_suite_test import ( "context" diff --git a/suites/v1beta1/rbac_test.go b/controllers_suite/rbac_test.go similarity index 99% rename from suites/v1beta1/rbac_test.go rename to controllers_suite/rbac_test.go index 95a10932b..760556f41 100644 --- a/suites/v1beta1/rbac_test.go +++ b/controllers_suite/rbac_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package suites_test +package controller_suite_test import ( "context" diff --git a/suites/v1beta1/statefulset_test.go b/controllers_suite/statefulset_test.go similarity index 98% rename from suites/v1beta1/statefulset_test.go rename to controllers_suite/statefulset_test.go index 92a2c4be6..698ae3aff 100644 --- a/suites/v1beta1/statefulset_test.go +++ b/controllers_suite/statefulset_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package suites_test +package controller_suite_test import ( "context" diff --git a/suites/v1beta1/suites_test.go b/controllers_suite/suites_test.go similarity index 97% rename from suites/v1beta1/suites_test.go rename to controllers_suite/suites_test.go index 8719f7914..6fb2c069f 100644 --- a/suites/v1beta1/suites_test.go +++ b/controllers_suite/suites_test.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package suites_test +package controller_suite_test import ( "context" @@ -81,10 +81,10 @@ var _ = BeforeSuite(func() { By("bootstrapping test environment") testEnv = &envtest.Environment{ - CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")}, + CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")}, ErrorIfCRDPathMissing: true, // WebhookInstallOptions: envtest.WebhookInstallOptions{ - // Paths: []string{filepath.Join("..", "..", "..", "config", "webhook")}, + // Paths: []string{filepath.Join("..", "config", "webhook")}, // }, }