diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-11 14:18:11 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-11 14:18:11 -0600 |
| commit | 67e0ccd1ad69d97b5f36b6f038feac5b8f7861ef (patch) | |
| tree | 9fd88adc8c1b45c416722b0ec5de74260e08e153 /pkg | |
| parent | 06618131ff1de346b79df00dff2db8d449563714 (diff) | |
chore: add test for remote check service
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/authz/remote_check_service_test.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/authz/remote_check_service_test.go b/pkg/authz/remote_check_service_test.go new file mode 100644 index 0000000..d06dab0 --- /dev/null +++ b/pkg/authz/remote_check_service_test.go @@ -0,0 +1,21 @@ +package authz + +import ( + "testing" + + auth "github.com/envoyproxy/go-control-plane/envoy/service/auth/v3" + "github.com/stretchr/testify/require" +) + +func TestRemoteCheckService(t *testing.T) { + t.Run("Check", func(t *testing.T) { + t.Run("when a client is not configured", func(t *testing.T) { + svc := NewRemoteCheckService(nil) + + result, err := svc.Check(t.Context(), &auth.CheckRequest{}) + + require.Nil(t, result) + require.Error(t, err) + }) + }) +} |
