Skip to content

Commit 87487ab

Browse files
authored
Merge pull request #980 from rabbitmq/fix-kubectl-plugin-tests
Update kubectl-bats tests
2 parents 6396dbe + 77f514c commit 87487ab

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,4 @@ jobs:
9999
export PATH=$PATH:$GOPATH/bin
100100
make install-tools
101101
kind create cluster --image kindest/node:"$K8S_VERSION"
102-
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind
103-
PATH=$PATH:$(pwd)/bin
104-
kubectl-rabbitmq.bats
102+
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind kubectl-plugin-tests

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ system-tests: install-tools ## Run end-to-end tests against Kubernetes cluster d
165165

166166
kubectl-plugin-tests: ## Run kubectl-rabbitmq tests
167167
echo "running kubectl plugin tests"
168-
./bin/kubectl-rabbitmq.bats
168+
PATH=$(PWD)/bin:$$PATH ./bin/kubectl-rabbitmq.bats
169169

170170
tests: unit-tests integration-tests system-tests kubectl-plugin-tests
171171

bin/kubectl-rabbitmq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ manage() {
226226
}
227227

228228
list_rabbitmq_clusters() {
229-
kubectl get ${NAMESPACE} rabbitmqclusters
229+
kubectl get ${NAMESPACE} rabbitmqclusters --sort-by='{.metadata.name}'
230230
}
231231

232232
create() {

bin/kubectl-rabbitmq.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ eventually() {
177177
kubectl rabbitmq debug bats-default
178178

179179
# '[debug] <pid> Lager installed handler' is logged even without enabling debug logging
180-
eventually "kubectl logs bats-default-server-0 | grep -v ' \[debug\] .* Lager installed handler ' | grep ' \[debug\] '" 30
180+
eventually "kubectl logs bats-default-server-0 | grep -v ' \[dbug\] .* Lager installed handler ' | grep ' \[dbug\] '" 30
181181
}
182182

183183
@test "delete deletes RabbitMQ cluster" {

0 commit comments

Comments
 (0)