Skip to content

Commit

Permalink
Merge pull request #386 from stakater/update-makefile
Browse files Browse the repository at this point in the history
Fix Pipeline Failure due to old test packages and kind version
  • Loading branch information
usamaahmadkhan committed Jun 9, 2022
2 parents 8496642 + faaaf48 commit c45364b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Expand Up @@ -14,7 +14,7 @@ env:
DOCKER_FILE_PATH: Dockerfile
GOLANG_VERSION: 1.16
KUBERNETES_VERSION: "1.20.2"
KIND_VERSION: "0.10.0"
KIND_VERSION: "0.11.1"

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Expand Up @@ -18,7 +18,7 @@ env:
OPERATOR_SDK_VERSION: "1.6.2"
KUSTOMIZE_VERSION: "3.5.4"
KUBERNETES_VERSION: "1.20.2"
KIND_VERSION: "0.10.0"
KIND_VERSION: "0.11.1"
HELM_REGISTRY_URL: "https://stakater.github.io/stakater-charts"

jobs:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -124,7 +124,7 @@ controller-gen: ## Download controller-gen locally if necessary.

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v3@v3.8.7)
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/v4@v4.5.4)

# go-get-tool will 'go get' any package $2 and install it to $1.
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))
Expand Down
13 changes: 7 additions & 6 deletions pkg/monitors/gcloud/gcloud-monitor_test.go
Expand Up @@ -18,10 +18,10 @@ func TestAddMonitorWithCorrectValues(t *testing.T) {
}

service.Setup(*provider)
m := models.Monitor{Name: "google-test", URL: "https://google1.com/"}
m := models.Monitor{Name: "google-test-gcloud", URL: "https://google1.com/"}
service.Add(m)

mRes, err := service.GetByName("google-test")
mRes, err := service.GetByName("google-test-gcloud")
if err != nil {
t.Error("Unable to get monitor by name with error", err)
}
Expand All @@ -36,6 +36,7 @@ func TestAddMonitorWithCorrectValues(t *testing.T) {
continue
}
inList = true
break
}
if !inList {
t.Error("Monitor should've been in list ")
Expand All @@ -60,10 +61,10 @@ func TestUpdateMonitorWithCorrectValues(t *testing.T) {
}
service.Setup(*provider)

m := models.Monitor{Name: "google-test", URL: "https://google.com/"}
m := models.Monitor{Name: "google-test-gcloud", URL: "https://google.com/"}
service.Add(m)

mRes, err := service.GetByName("google-test")
mRes, err := service.GetByName("google-test-gcloud")
if err != nil {
t.Error("Unable to get monitor by name with error", err)
}
Expand All @@ -72,12 +73,12 @@ func TestUpdateMonitorWithCorrectValues(t *testing.T) {
t.Error("URL and name should be the same")
}

mRes.Name = "google-test2"
mRes.Name = "google-test-gcloud2"
mRes.URL = "https://google.com/test"

service.Update(*mRes)

mRes, err = service.GetByName("google-test2")
mRes, err = service.GetByName("google-test-gcloud2")

if err != nil {
t.Error("Error: " + err.Error())
Expand Down
10 changes: 5 additions & 5 deletions pkg/monitors/statuscake/statuscake-monitor_test.go
Expand Up @@ -21,10 +21,10 @@ func TestAddMonitorWithCorrectValues(t *testing.T) {
return
}
service.Setup(*provider)
m := models.Monitor{Name: "google-test", URL: "https://google1.com"}
m := models.Monitor{Name: "google-test-statuscake", URL: "https://google1.com"}
service.Add(m)

mRes, err := service.GetByName("google-test")
mRes, err := service.GetByName("google-test-statuscake")

if err != nil {
t.Error("Error: " + err.Error())
Expand Down Expand Up @@ -54,10 +54,10 @@ func TestUpdateMonitorWithCorrectValues(t *testing.T) {
}
service.Setup(*provider)

m := models.Monitor{Name: "google-test", URL: "https://google.com"}
m := models.Monitor{Name: "google-test-statuscake", URL: "https://google.com"}
service.Add(m)

mRes, err := service.GetByName("google-test")
mRes, err := service.GetByName("google-test-statuscake")

if err != nil {
t.Error("Error: " + err.Error())
Expand All @@ -70,7 +70,7 @@ func TestUpdateMonitorWithCorrectValues(t *testing.T) {

service.Update(*mRes)

mRes, err = service.GetByName("google-test")
mRes, err = service.GetByName("google-test-statuscake")

if err != nil {
t.Error("Error: " + err.Error())
Expand Down

0 comments on commit c45364b

Please sign in to comment.