forked from couchbase/gocbcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kvmuxstate_test.go
30 lines (24 loc) · 1.05 KB
/
kvmuxstate_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package gocbcore
func (suite *StandardTestSuite) TestKvMuxState_BucketCapabilities_InitialConfig() {
cfg := &routeConfig{
revID: -1,
}
muxState := newKVMuxState(cfg, nil, nil, nil, nil, nil, nil)
suite.Assert().Equal(map[BucketCapability]BucketCapabilityStatus{
BucketCapabilityDurableWrites: BucketCapabilityStatusUnknown,
BucketCapabilityCreateAsDeleted: BucketCapabilityStatusUnknown,
BucketCapabilityReplaceBodyWithXattr: BucketCapabilityStatusUnknown,
}, muxState.bucketCapabilities)
}
func (suite *StandardTestSuite) TestKvMuxState_BucketCapabilities() {
cfg := &routeConfig{
revID: 1,
bucketCapabilities: []string{"durableWrite"},
}
muxState := newKVMuxState(cfg, nil, nil, nil, nil, nil, nil)
suite.Assert().Equal(map[BucketCapability]BucketCapabilityStatus{
BucketCapabilityDurableWrites: BucketCapabilityStatusSupported,
BucketCapabilityCreateAsDeleted: BucketCapabilityStatusUnsupported,
BucketCapabilityReplaceBodyWithXattr: BucketCapabilityStatusUnsupported,
}, muxState.bucketCapabilities)
}