Skip to content

Commit

Permalink
Update README.md (#10)
Browse files Browse the repository at this point in the history
* Update README.md

* fix: linting bugs

* fix: cleanup makefile
  • Loading branch information
Richard87 authored Oct 24, 2024
1 parent 5ce458a commit 83bb87c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
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

0 comments on commit 83bb87c

Please sign in to comment.