Commit graph android_packages_modules_Co.../tests/unit/res/raw
Message SHA1
Add golden sample test for storing transport types kill switch support
This test uses a golden sample to verify that the file reading
results are as expected when the storing transport types feature
is either enabled or disabled. This is to ensure compatibility
when the feature is remotely disabled.

The golden sample is taken from a test device after manually
performing a file download.

Flag: EXEMPT test only
Test: atest ConnectivityCoverageTests:android.net.connectivity.android.net.NetworkStatsCollectionTest \
      --update-device
Test: Manually:
      1. adb shell device_config put tethering store_transport_types 1
      2. Download files
      3. adb shell dumpsys netstats --poll
      4. adb pull /data/misc/apexdata/com.android.tethering/netstats .
      5. Check-in the active netstats_uid* file.

Bug: 419123367
Change-Id: I266d07703f3ad47239d9c6721cdcd417ae4f179f

Junyu Lai   commited 2025-06-12 13:31:38 +08:00
76a774c21a
Refactor NetworkStatsFactoryTest
This patch changes the way of mocking samples in the tests, and
enabling use bpf stats flag, testing through the code path
that is not running in the production code does not make any
sense.

This change also copied methods from NetworkStatsFactory
as we want to continue parsing the golden files to test the
464xlat adjustment which historically has been prone to errors.
And deleting tests that does not execrise NetworkStatsFactory
code or rely on monotonic accumulative readings from native
layer, which is not happening today.

Bug: 234315786
Test: atest FrameworksNetTests CtsNetTestCases \
      ConnectivityCoverageTests
Change-Id: I5cab2b78651f1da628705c191e42857c8b59d826

junyulai   authored and   Junyu Lai   commited 2022-07-29 15:46:18 +08:00
8c77e385bd
[MS59.2] Add unit test for NetworkStatsDataMigrationUtils
Test: atest NetworkStatsDataMigrationUtilsTest
Bug: 204830222
Change-Id: Ia6e8aec9a828072a2a1e63bec600c2e20d3699b3

junyulai   authored and   Junyu Lai   commited 2022-01-26 16:53:06 +00:00
a1bb3a36cd
Move net unit tests to packages/Connectivity
Move the tests together with packages/Connectivity code, so both can be
moved to packages/modules/Connectivity together.

Also reorganize unit tests in a unit/ directory, as other tests
(integration/, common/ etc.) have been added in tests/net since they
were created. This makes the directory structure consistent.

Test: atest FrameworksNetTests
Bug: 187814163
Merged-In: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Change-Id: I254ffd1c08ec058d594b4ea55cbae5505f8497cc

Remi NGUYEN VAN   commited 2021-05-13 08:30:33 +00:00
5ed250d90a