File: challenge_test.go

package info (click to toggle)
golang-github-colinmarc-hdfs 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,760 kB
  • sloc: sh: 130; xml: 40; makefile: 31
file content (18 lines) | stat: -rw-r--r-- 466 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package sasl

import (
	"sort"
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestSortQops(t *testing.T) {
	allQops := Qops{QopAuthentication, QopIntegrity, QopPrivacy}
	sort.Sort(allQops)
	assert.Equal(t, Qops{QopPrivacy, QopIntegrity, QopAuthentication}, allQops)

	includeInvalidQops := Qops{QopAuthentication, QopPrivacy, "invalid"}
	sort.Sort(includeInvalidQops)
	assert.Equal(t, Qops{QopPrivacy, QopAuthentication, "invalid"}, includeInvalidQops)
}