@@ -15,70 +15,62 @@ import (
15
15
)
16
16
17
17
func TestApplicationV10 (t * testing.T ) {
18
- op := NewApplicationProvider (map [string ]* cb.Capability {})
19
- assert .NoError (t , op .Supported ())
18
+ ap := NewApplicationProvider (map [string ]* cb.Capability {})
19
+ assert .NoError (t , ap .Supported ())
20
20
}
21
21
22
22
func TestApplicationV11 (t * testing.T ) {
23
- op := NewApplicationProvider (map [string ]* cb.Capability {
23
+ ap := NewApplicationProvider (map [string ]* cb.Capability {
24
24
ApplicationV1_1 : {},
25
25
})
26
- assert .NoError (t , op .Supported ())
27
- assert .True (t , op .ForbidDuplicateTXIdInBlock ())
28
- assert .True (t , op .V1_1Validation ())
26
+ assert .NoError (t , ap .Supported ())
27
+ assert .True (t , ap .ForbidDuplicateTXIdInBlock ())
28
+ assert .True (t , ap .V1_1Validation ())
29
29
}
30
30
31
31
func TestApplicationV12 (t * testing.T ) {
32
- op := NewApplicationProvider (map [string ]* cb.Capability {
33
- ApplicationV1_2 : {},
34
- })
35
- assert .NoError (t , op .Supported ())
36
- assert .True (t , op .ForbidDuplicateTXIdInBlock ())
37
- assert .True (t , op .V1_1Validation ())
38
- assert .True (t , op .V1_2Validation ())
39
- assert .True (t , op .KeyLevelEndorsement ())
40
- }
41
-
42
- func TestApplicationPvtDataExperimental (t * testing.T ) {
43
- op := NewApplicationProvider (map [string ]* cb.Capability {
44
- ApplicationPvtDataExperimental : {},
45
- })
46
- assert .True (t , op .PrivateChannelData ())
47
-
48
- op = NewApplicationProvider (map [string ]* cb.Capability {
49
- ApplicationV1_2 : {},
50
- })
51
- assert .True (t , op .PrivateChannelData ())
52
-
53
- }
54
-
55
- func TestApplicationACLs (t * testing.T ) {
56
32
ap := NewApplicationProvider (map [string ]* cb.Capability {
57
33
ApplicationV1_2 : {},
58
34
})
35
+ assert .NoError (t , ap .Supported ())
36
+ assert .True (t , ap .ForbidDuplicateTXIdInBlock ())
37
+ assert .True (t , ap .V1_1Validation ())
38
+ assert .True (t , ap .V1_2Validation ())
39
+ assert .True (t , ap .KeyLevelEndorsement ())
59
40
assert .True (t , ap .ACLs ())
41
+ assert .True (t , ap .CollectionUpgrade ())
42
+ assert .True (t , ap .PrivateChannelData ())
60
43
}
61
44
62
- func TestApplicationCollectionUpgrade (t * testing.T ) {
63
- op := NewApplicationProvider (map [string ]* cb.Capability {
64
- ApplicationV1_2 : {},
45
+ func TestApplicationV13 (t * testing.T ) {
46
+ ap := NewApplicationProvider (map [string ]* cb.Capability {
47
+ ApplicationV1_3 : {},
65
48
})
66
- assert .True (t , op .CollectionUpgrade ())
49
+ assert .NoError (t , ap .Supported ())
50
+ assert .True (t , ap .ForbidDuplicateTXIdInBlock ())
51
+ assert .True (t , ap .V1_1Validation ())
52
+ assert .True (t , ap .V1_2Validation ())
53
+ assert .True (t , ap .V1_3Validation ())
54
+ assert .True (t , ap .KeyLevelEndorsement ())
55
+ assert .True (t , ap .MetadataLifecycle ())
56
+ assert .True (t , ap .ACLs ())
57
+ assert .True (t , ap .CollectionUpgrade ())
58
+ assert .True (t , ap .PrivateChannelData ())
67
59
}
68
60
69
- func TestChaincodeLifecycleExperimental (t * testing.T ) {
70
- op := NewApplicationProvider (map [string ]* cb.Capability {
71
- ApplicationChaincodeLifecycleExperimental : {},
61
+ func TestApplicationPvtDataExperimental (t * testing.T ) {
62
+ ap := NewApplicationProvider (map [string ]* cb.Capability {
63
+ ApplicationPvtDataExperimental : {},
72
64
})
73
- assert .True (t , op . MetadataLifecycle ())
65
+ assert .True (t , ap . PrivateChannelData ())
74
66
}
75
67
76
68
func TestHasCapability (t * testing.T ) {
77
- op := NewApplicationProvider (map [string ]* cb.Capability {})
78
- assert .True (t , op .HasCapability (ApplicationV1_1 ))
79
- assert .True (t , op .HasCapability (ApplicationV1_2 ))
80
- assert .True (t , op .HasCapability (ApplicationPvtDataExperimental ))
81
- assert .True (t , op .HasCapability (ApplicationResourcesTreeExperimental ))
82
- assert .True (t , op .HasCapability (ApplicationChaincodeLifecycleExperimental ))
83
- assert .False (t , op .HasCapability ("default" ))
69
+ ap := NewApplicationProvider (map [string ]* cb.Capability {})
70
+ assert .True (t , ap .HasCapability (ApplicationV1_1 ))
71
+ assert .True (t , ap .HasCapability (ApplicationV1_2 ))
72
+ assert .True (t , ap .HasCapability (ApplicationV1_3 ))
73
+ assert .True (t , ap .HasCapability (ApplicationPvtDataExperimental ))
74
+ assert .True (t , ap .HasCapability (ApplicationResourcesTreeExperimental ))
75
+ assert .False (t , ap .HasCapability ("default" ))
84
76
}
0 commit comments