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

Commit c35a8165 authored by Chiachang Wang's avatar Chiachang Wang
Browse files

Add SDK version check to skip S added API test

NetworkAgentConfigTest is a part of CtsNetTestCasesLatestSdk.
It will be used in mainline test with a R build. Test will
fail with method not found error. Add a version check to skip
the S added API tests.

Test: atest NetworkAgentConfigTest in R and S device
Fix: 185151127
Change-Id: Ib372e68afa99af455eb2713c8f6f1c8ef1d4cfdf
parent e9f341c2
Loading
Loading
Loading
Loading
+11 −4
Original line number Diff line number Diff line
@@ -63,8 +63,10 @@ class NetworkAgentConfigTest {
            setPartialConnectivityAcceptable(false)
            setUnvalidatedConnectivityAcceptable(true)
            setLegacyTypeName("TEST_NETWORK")
            if (isAtLeastS()) {
                setNat64DetectionEnabled(false)
                setProvisioningNotificationEnabled(false)
            }
        }.build()

        assertTrue(config.isExplicitlySelected())
@@ -73,7 +75,12 @@ class NetworkAgentConfigTest {
        assertFalse(config.isPartialConnectivityAcceptable())
        assertTrue(config.isUnvalidatedConnectivityAcceptable())
        assertEquals("TEST_NETWORK", config.getLegacyTypeName())
        if (isAtLeastS()) {
            assertFalse(config.isNat64DetectionEnabled())
            assertFalse(config.isProvisioningNotificationEnabled())
        } else {
            assertTrue(config.isNat64DetectionEnabled())
            assertTrue(config.isProvisioningNotificationEnabled())
        }
    }
}