@@ -24,17 +24,17 @@ func TestPointValue(t *testing.T) {
24
24
}
25
25
26
26
seLinuxStrategies := map [kapi.SELinuxContextStrategyType ]int {
27
- kapi .SELinuxStrategyRunAsAny : 4 ,
28
- kapi .SELinuxStrategyMustRunAs : 1 ,
27
+ kapi .SELinuxStrategyRunAsAny : 40000 ,
28
+ kapi .SELinuxStrategyMustRunAs : 10000 ,
29
29
}
30
30
userStrategies := map [kapi.RunAsUserStrategyType ]int {
31
- kapi .RunAsUserStrategyRunAsAny : 4 ,
32
- kapi .RunAsUserStrategyMustRunAsNonRoot : 3 ,
33
- kapi .RunAsUserStrategyMustRunAsRange : 2 ,
34
- kapi .RunAsUserStrategyMustRunAs : 1 ,
31
+ kapi .RunAsUserStrategyRunAsAny : 40000 ,
32
+ kapi .RunAsUserStrategyMustRunAsNonRoot : 30000 ,
33
+ kapi .RunAsUserStrategyMustRunAsRange : 20000 ,
34
+ kapi .RunAsUserStrategyMustRunAs : 10000 ,
35
35
}
36
36
37
- privilegedPoints := 20
37
+ privilegedPoints := 200000
38
38
39
39
// run through all combos of user strategy + seLinux strategy + priv
40
40
for userStrategy , userStrategyPoints := range userStrategies {
@@ -61,7 +61,7 @@ func TestPointValue(t *testing.T) {
61
61
scc := newSCC (false , kapi .SELinuxStrategyMustRunAs , kapi .RunAsUserStrategyMustRunAs )
62
62
scc .Volumes = []kapi.FSType {kapi .FSTypeHostPath }
63
63
actualPoints := pointValue (scc )
64
- if actualPoints != 12 { //1 (SELinux) + 1 (User) + 10 (host path volume)
64
+ if actualPoints != 120000 { //10000 (SELinux) + 10000 (User) + 100000 (host path volume)
65
65
t .Errorf ("volume score was not added to the scc point value correctly!" )
66
66
}
67
67
}
@@ -94,27 +94,27 @@ func TestVolumePointValue(t *testing.T) {
94
94
}{
95
95
"all volumes" : {
96
96
scc : allowAllSCC ,
97
- expectedPoints : 10 ,
97
+ expectedPoints : 100000 ,
98
98
},
99
99
"host volume" : {
100
100
scc : newSCC (true , false , false ),
101
- expectedPoints : 10 ,
101
+ expectedPoints : 100000 ,
102
102
},
103
103
"host volume and non trivial volumes" : {
104
104
scc : newSCC (true , true , false ),
105
- expectedPoints : 10 ,
105
+ expectedPoints : 100000 ,
106
106
},
107
107
"host volume, non trivial, and trivial" : {
108
108
scc : newSCC (true , true , true ),
109
- expectedPoints : 10 ,
109
+ expectedPoints : 100000 ,
110
110
},
111
111
"non trivial" : {
112
112
scc : newSCC (false , true , false ),
113
- expectedPoints : 5 ,
113
+ expectedPoints : 50000 ,
114
114
},
115
115
"non trivial and trivial" : {
116
116
scc : newSCC (false , true , true ),
117
- expectedPoints : 5 ,
117
+ expectedPoints : 50000 ,
118
118
},
119
119
"trivial" : {
120
120
scc : newSCC (false , false , true ),
0 commit comments