Skip to content

Commit

Permalink
Fix e2e job NATS Install step (#379)
Browse files Browse the repository at this point in the history
* Fix e2e job NATS Install step

* Fix magic number linting errors
  • Loading branch information
muralov authored Jan 11, 2024
1 parent dd93deb commit a4bceab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Setup NATS
run: |
make -C hack/ci/ get-nats-via-lifecycle-manager
make -C hack/ci/ install-nats-module
- name: Setup and test the eventing-manager
run: |
Expand Down
5 changes: 5 additions & 0 deletions hack/ci/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ enable-nats-module:
get-nats-via-lifecycle-manager: install-lifecycle-manager install-latest-nats-module-template-fast enable-nats-module
./check-k8s-resource-is-ready.sh 180 nats kyma-system

.PHONY: install-nats-module
install-nats-module:
kubectl apply -f https://github.com/kyma-project/nats-manager/releases/latest/download/nats-manager.yaml
kubectl apply -f https://github.com/kyma-project/nats-manager/releases/latest/download/nats-default-cr.yaml

.PHONY: verify-kyma
verify-kyma: ## Wait for Kyma CR to be in Ready state.
../verify_kyma_status.sh
Expand Down
6 changes: 4 additions & 2 deletions testing/eventmeshmock.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ func (m *EventMeshMock) handleMessaging() func(w http.ResponseWriter, r *http.Re
if err == nil {
break
}
if i < 2 { // Don't sleep after the last attempt
time.Sleep(3 * time.Second)
two := 2
three := 3
if i < two { // Don't sleep after the last attempt
time.Sleep(time.Duration(three) * time.Second)
} else {
panic(err)
}
Expand Down

0 comments on commit a4bceab

Please sign in to comment.