gssapi_test.go 521 B

123456789101112131415161718192021222324
  1. package gssapi
  2. import (
  3. "testing"
  4. "github.com/jcmturner/gofork/encoding/asn1"
  5. "github.com/stretchr/testify/assert"
  6. )
  7. func TestOID(t *testing.T) {
  8. var tests = []struct {
  9. name OIDName
  10. oid []int
  11. }{
  12. {OIDMSLegacyKRB5, []int{1, 2, 840, 48018, 1, 2, 2}},
  13. {OIDKRB5, []int{1, 2, 840, 113554, 1, 2, 2}},
  14. {OIDSPNEGO, []int{1, 3, 6, 1, 5, 5, 2}},
  15. }
  16. for _, tst := range tests {
  17. oid := asn1.ObjectIdentifier(tst.oid)
  18. assert.True(t, oid.Equal(OID(tst.name)), "OID value not as expected for %s", tst.name)
  19. }
  20. }