diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-17 11:57:05 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-17 11:57:05 -0600 |
| commit | 7db38ae743b025546202ea32651ad40a0c3c7d77 (patch) | |
| tree | e28fde9ef8bc08deb64e14b92ec2a7a19f619d0b /pkg | |
| parent | ffc84879d50f22e2efaacd055e21023216f6e07e (diff) | |
test: add test to ensure the sts server is started
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/sts/server_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/pkg/sts/server_test.go b/pkg/sts/server_test.go new file mode 100644 index 0000000..ad8ff28 --- /dev/null +++ b/pkg/sts/server_test.go @@ -0,0 +1,22 @@ +package sts + +import ( + "net/http" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/xlgmokha/x/pkg/test" +) + +func TestServer(t *testing.T) { + t.Run("New", func(t *testing.T) { + server := New(t.Context()) + + t.Run("GET /", func(t *testing.T) { + r, w := test.RequestResponse("GET", "/") + + server.ServeHTTP(w, r) + assert.Equal(t, http.StatusNotFound, w.Code) + }) + }) +} |
