attestation_unsupported_test.go 522 B

1234567891011121314151617181920
  1. //go:build !darwin
  2. package liveattestation
  3. import (
  4. "context"
  5. "errors"
  6. "testing"
  7. )
  8. func TestUnsupportedProviderReturnsExplicitPlatformError(t *testing.T) {
  9. provider := NewProvider()
  10. if err := provider.Check(context.Background()); !errors.Is(err, ErrUnsupportedPlatform) {
  11. t.Fatalf("Check() error = %v, want ErrUnsupportedPlatform", err)
  12. }
  13. _, err := provider.Generate(context.Background())
  14. if !errors.Is(err, ErrUnsupportedPlatform) {
  15. t.Fatalf("Generate() error = %v, want ErrUnsupportedPlatform", err)
  16. }
  17. }