Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6a68c9a3 authored by JW Wang's avatar JW Wang Committed by Android (Google) Code Review
Browse files

Merge "Move network tests to new classes (1/n)"

parents 2f2cae94 ce92d630
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -35,6 +35,15 @@ java_test_host {
    data: [":com.android.apex.apkrollback.test_v1"],
}

java_test_host {
    name: "NetworkStagedRollbackTest",
    srcs: ["NetworkStagedRollbackTest/src/**/*.java"],
    libs: ["tradefed"],
    static_libs: ["testng"],
    test_suites: ["general-tests"],
    test_config: "NetworkStagedRollbackTest.xml",
}

java_test_host {
    name: "MultiUserRollbackTest",
    srcs: ["MultiUserRollbackTest/src/**/*.java"],
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2020 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<configuration description="Runs the network staged rollback tests">
    <option name="test-suite-tag" value="NetworkStagedRollbackTest" />
    <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
        <option name="cleanup-apks" value="true" />
        <option name="test-file-name" value="RollbackTest.apk" />
    </target_preparer>
    <test class="com.android.tradefed.testtype.HostTest" >
        <option name="class" value="com.android.tests.rollback.host.NetworkStagedRollbackTest" />
    </test>
</configuration>
+43 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.tests.rollback.host;

import com.android.tradefed.testtype.DeviceJUnit4ClassRunner;
import com.android.tradefed.testtype.junit4.BaseHostJUnit4Test;

import org.junit.Test;
import org.junit.runner.RunWith;

/**
 * Runs the network rollback tests.
 */
@RunWith(DeviceJUnit4ClassRunner.class)
public class NetworkStagedRollbackTest extends BaseHostJUnit4Test {
    /**
     * Tests failed network health check triggers watchdog staged rollbacks.
     */
    @Test
    public void testNetworkFailedRollback() throws Exception {
    }

    /**
     * Tests passed network health check does not trigger watchdog staged rollbacks.
     */
    @Test
    public void testNetworkPassedDoesNotRollback() throws Exception {
    }
}
+2 −2
Original line number Diff line number Diff line
@@ -22,9 +22,9 @@
        <option name="package" value="com.android.tests.rollback" />
        <option name="runner" value="androidx.test.runner.AndroidJUnitRunner" />

        <!-- Exclude the StagedRollbackTest and MultiUserRollbackTest tests, which need to be
             specially driven from the StagedRollbackTest and MultiUserRollbackTest host test -->
        <!-- Exclude the device tests which need to be specially driven from the host tests -->
        <option name="exclude-filter" value="com.android.tests.rollback.StagedRollbackTest" />
        <option name="exclude-filter" value="com.android.tests.rollback.NetworkStagedRollbackTest" />
        <option name="exclude-filter" value="com.android.tests.rollback.MultiUserRollbackTest" />
    </test>
</configuration>
+24 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.tests.rollback;

import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;

@RunWith(JUnit4.class)
public class NetworkStagedRollbackTest {
}