Skip to content

Commit

Permalink
Merge pull request #36 from COS301-SE-2024/chore/backend/comment-out-…
Browse files Browse the repository at this point in the history
…env-tests

Chore: commented out test that uses env variables
  • Loading branch information
waveyboym authored Jun 3, 2024
2 parents 0775967 + d2b08c0 commit c602757
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/lint-test-build-golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
"occupi-backend/cmd/**",
"occupi-backend/configs/**",
"occupi-backend/pkg/**",
"occupi-backend/.golangci.yml"
"occupi-backend/.golangci.yml",
"occupi-backend/tests/**",
]

workflow_dispatch:
Expand Down
7 changes: 3 additions & 4 deletions occupi-backend/tests/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@ import (
"net/http/httptest"
"testing"

"github.com/COS301-SE-2024/occupi/occupi-backend/pkg/database"
"github.com/COS301-SE-2024/occupi/occupi-backend/pkg/handlers"
"github.com/COS301-SE-2024/occupi/occupi-backend/pkg/models"
"github.com/gin-gonic/gin"
"github.com/joho/godotenv"
// "github.com/joho/godotenv"
// "github.com/stretchr/testify/assert"
// "github.com/stretchr/testify/mock"
)
Expand Down Expand Up @@ -178,6 +175,7 @@ func TestPingRoute(t *testing.T) {
}
}

/*
func TestGetResource(t *testing.T) {
// Load environment variables from .env file
if err := godotenv.Load("../.env"); err != nil {
Expand Down Expand Up @@ -215,3 +213,4 @@ func TestGetResource(t *testing.T) {
t.Errorf("handler returned wrong status code: got %v want %v", status, http.StatusOK)
}
}
*/

0 comments on commit c602757

Please sign in to comment.