Skip to content

Commit

Permalink
feat: remove redundant ci
Browse files Browse the repository at this point in the history
  • Loading branch information
GoliathLabs committed Jun 8, 2024
1 parent 8704fb9 commit 9309529
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 76 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ on:
pull_request:

jobs: # Docs: <https://git.io/JvxXE>
gitleaks:
name: Gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0}

- uses: gacts/gitleaks@v1 # Action page: <https://github.com/zricethezav/gitleaks-action>
with:
config-path: .gitleaks.toml

golangci-lint:
name: Golang-CI (lint)
runs-on: ubuntu-latest
Expand Down
26 changes: 0 additions & 26 deletions .github/workflows/test.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .gitleaks.toml

This file was deleted.

20 changes: 0 additions & 20 deletions bouncer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,23 +70,3 @@ func TestForwardAuthValidIp(t *testing.T) {

assert.Equal(t, 200, w.Code)
}

/**
FIXME Since we are using var in module, they are loaded before tests. So changing their values with environment variables have no effect.
*/
func testForwardAuthBannedIpCustomResponse(t *testing.T) {
// Setup
expectedResponseMsg := "Not Found"
t.Setenv("CROWDSEC_BOUNCER_BAN_RESPONSE_CODE", "404")
t.Setenv("CROWDSEC_BOUNCER_BAN_RESPONSE_MSG", expectedResponseMsg)

router, _ := setupRouter()

w := httptest.NewRecorder()
req, _ := http.NewRequest("GET", "/api/v1/forwardAuth", nil)
req.RemoteAddr = "1.2.3.4:48328"
router.ServeHTTP(w, req)

assert.Equal(t, 404, w.Code)
assert.Equal(t, expectedResponseMsg, w.Body.String())
}

0 comments on commit 9309529

Please sign in to comment.