Commit Graph

5 Commits

Author SHA1 Message Date
chiachangwang
c18f0bbbb3 Add helper method to generate a v6 NAT-T keepalive packet
This is a part of preliminary work for sending a v6 NAT-T
keepalive packet in a v6 only network. This commit
release the constraint on constructing a v6 NAT-T keepalive
packet.

Bug: 196453719
Test: Manually connect to v6 only network and check if the
      keepalive packets are sent with subsequent commit
Test: atest FrameworksNetTests with the updated test
Change-Id: I9dc96e840265c5dee6b9e3ef2b3901a0aeb4ff9e
2023-06-13 11:50:13 +00:00
chiachangwang
60179ec28e Use assertFailsWith to verify exception cases
Test: atest FrameworksNetTests
Change-Id: If7373a1e6543975bee9c646384f6ca4d643a1711
2023-06-09 06:08:39 +00:00
chiachangwang
8af048721a Correct the order of import and remove unused definition
Test: atest
Change-Id: I60c409db5436a5ba9fffdee9df24158f15751658
2023-06-07 06:46:29 +00:00
Remi NGUYEN VAN
8bc36966d4 Do not verify field count in tests used in CTS
Tests in tests/common and tests/cts are run as part of CtsNetTestCases.
Many used assertFieldCountEquals in parceling/unparceling tests to
ensure that unexpected fields were not added, or that they were not
missed when testing parceling/unparceling.

However with many of the classes updatable through module updates, the
field count may change in the future, breaking CTS tests.

Stop checking for the field count, as it would break on module releases,
and its value is lower than the maintenance cost.

Bug: 205901761
Test: atest CtsNetTestCases
Change-Id: I79854741f7e834574d4825bb737ef507785310fe
2022-01-18 16:55:32 +09:00
Remi NGUYEN VAN
5ed250d90a 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
2021-05-13 08:30:33 +00:00