live_billing_guard_test.go 374 B

1234567891011121314
  1. package service
  2. import (
  3. "context"
  4. "github.com/stretchr/testify/require"
  5. "testing"
  6. )
  7. func TestLiveBillingGuardStopsBeforeCredentialsOrUpstream(t *testing.T) {
  8. svc := &OpenAIGatewayService{}
  9. result, err := svc.CreateLiveCall(context.Background(), &LiveCallRequest{}, LiveCallIdentity{}, 1)
  10. require.ErrorIs(t, err, ErrLiveBillingUnavailable)
  11. require.Nil(t, result)
  12. }