Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update kubectl-bats tests #980

Merged
merged 1 commit into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,4 @@ jobs:
export PATH=$PATH:$GOPATH/bin
make install-tools
kind create cluster --image kindest/node:"$K8S_VERSION"
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind
PATH=$PATH:$(pwd)/bin
kubectl-rabbitmq.bats
DOCKER_REGISTRY_SERVER=local-server OPERATOR_IMAGE=local-operator make deploy-kind kubectl-plugin-tests
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ system-tests: install-tools ## Run end-to-end tests against Kubernetes cluster d

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

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

Expand Down
2 changes: 1 addition & 1 deletion bin/kubectl-rabbitmq
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ manage() {
}

list_rabbitmq_clusters() {
kubectl get ${NAMESPACE} rabbitmqclusters
kubectl get ${NAMESPACE} rabbitmqclusters --sort-by='{.metadata.name}'
}

create() {
Expand Down
2 changes: 1 addition & 1 deletion bin/kubectl-rabbitmq.bats
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ eventually() {
kubectl rabbitmq debug bats-default

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

@test "delete deletes RabbitMQ cluster" {
Expand Down