Move TestEnforceRRO test cases into test function
The test cases will need to reference buildDir, which is not yet set at global variable initialization time. Bug: 123510624 Test: TestEnforceRRO Change-Id: I0dda0184dfab496c820e11ed76b7594a60d5d587
This commit is contained in:
committed by
Anton Hansson
parent
cc2d11961c
commit
5c4791c71e
@@ -106,7 +106,8 @@ func TestApp(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var testEnforceRROTests = []struct {
|
func TestEnforceRRO(t *testing.T) {
|
||||||
|
testCases := []struct {
|
||||||
name string
|
name string
|
||||||
enforceRROTargets []string
|
enforceRROTargets []string
|
||||||
enforceRROExcludedOverlays []string
|
enforceRROExcludedOverlays []string
|
||||||
@@ -167,7 +168,6 @@ var testEnforceRROTests = []struct {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestEnforceRRO(t *testing.T) {
|
|
||||||
resourceOverlays := []string{
|
resourceOverlays := []string{
|
||||||
"device/vendor/blah/overlay",
|
"device/vendor/blah/overlay",
|
||||||
"device/vendor/blah/overlay2",
|
"device/vendor/blah/overlay2",
|
||||||
@@ -196,7 +196,7 @@ func TestEnforceRRO(t *testing.T) {
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
for _, testCase := range testEnforceRROTests {
|
for _, testCase := range testCases {
|
||||||
t.Run(testCase.name, func(t *testing.T) {
|
t.Run(testCase.name, func(t *testing.T) {
|
||||||
config := testConfig(nil)
|
config := testConfig(nil)
|
||||||
config.TestProductVariables.ResourceOverlays = resourceOverlays
|
config.TestProductVariables.ResourceOverlays = resourceOverlays
|
||||||
|
Reference in New Issue
Block a user