Replace UserIDRange/GroupIDRange by IDRange in internal type to reduce difference with external type.

We had IDRange in both types prior 9440a68744 commit that splitted it
into UserIDRange/GroupIDRange. Later, in c91a12d205 commit we had to
revert this changes because they broke backward compatibility but
UserIDRange/GroupIDRange struct left in the internal type.

This commit removes these leftovers and reduces the differences
between internal and external types.
This commit is contained in:
Slava Semushin
2018-05-04 17:37:12 +02:00
parent 54cf942a05
commit f49a0fbd5f
10 changed files with 55 additions and 75 deletions

View File

@@ -38,7 +38,7 @@ func TestNewMustRunAs(t *testing.T) {
},
"valid opts": {
opts: &policy.RunAsUserStrategyOptions{
Ranges: []policy.UserIDRange{
Ranges: []policy.IDRange{
{Min: 1, Max: 1},
},
},
@@ -58,7 +58,7 @@ func TestNewMustRunAs(t *testing.T) {
func TestGenerate(t *testing.T) {
opts := &policy.RunAsUserStrategyOptions{
Ranges: []policy.UserIDRange{
Ranges: []policy.IDRange{
{Min: 1, Max: 1},
},
}
@@ -77,7 +77,7 @@ func TestGenerate(t *testing.T) {
func TestValidate(t *testing.T) {
opts := &policy.RunAsUserStrategyOptions{
Ranges: []policy.UserIDRange{
Ranges: []policy.IDRange{
{Min: 1, Max: 1},
{Min: 10, Max: 20},
},