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 README.md #10

Merged
merged 3 commits into from
Oct 24, 2024
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
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

.PHONY: build
build: $(BINS)

.PHONY: test
test:
go test -cover `go list ./...`

.PHONY: lint
lint: bootstrap
golangci-lint run --max-same-issues 0 --timeout 10m


HAS_GOLANGCI_LINT := $(shell command -v golangci-lint;)

bootstrap:
ifndef HAS_GOLANGCI_LINT
go install github.com/golangci/golangci-lint/cmd/[email protected]
endif
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg)](https://conventionalcommits.org)
[![Release](https://github.com/equinor/radix-ingress-default-backend/actions/workflows/release-please.yaml/badge.svg?branch=main&event=push)](https://github.com/equinor/radix-ingress-default-backend/actions/workflows/release-please.yaml)
[![SCM Compliance](https://scm-compliance-api.radix.equinor.com/repos/equinor/radix-ingress-default-backend/badge)](https://developer.equinor.com/governance/scm-policy/)

Expand Down
2 changes: 2 additions & 0 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func TestRun(t *testing.T) {
defer server.Close()

req, err := http.NewRequest(http.MethodGet, server.URL, nil)
require.NoError(t, err)
req.Header.Add("X-Namespace", "hello-world-dev")
req.Header.Add("X-Code", "503")
regularRequest, err := http.DefaultClient.Do(req)
Expand All @@ -28,6 +29,7 @@ func TestRun(t *testing.T) {
assert.Contains(t, string(bytes), "Server error - Radix")

req, err = http.NewRequest(http.MethodGet, server.URL, nil)
require.NoError(t, err)
req.Header.Add("X-Namespace", "equinor-web-sites-dev")
req.Header.Add("X-Code", "503")
equinorRequst, err := http.DefaultClient.Do(req)
Expand Down