Skip to content

Commit

Permalink
Add more test
Browse files Browse the repository at this point in the history
Signed-off-by: Ze Gan <[email protected]>
  • Loading branch information
Pterosaur authored and saiarcot895 committed Apr 3, 2024
1 parent 4edc6d6 commit 8e224b3
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions unittest/vslib/TestMACsecManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,27 @@ TEST(MACsecManager, create_macsec_ingress_sa)
manager.create_macsec_ingress_sa(attr);
}

TEST(MACsecManager, create_macsec_egress_sa)
{
// This is a system call that may not be valid in the test environment,
// So, this case is just for the testing coverage checking.

MACsecManager manager;

MACsecAttr attr;
attr.m_vethName = "eth0";
attr.m_macsecName = "macsec_eth0";
attr.m_sci = "02:42:ac:11:00:03";
attr.m_an = 0;
attr.m_pn = 1;
attr.m_cipher = MACsecAttr::CIPHER_NAME_GCM_AES_XPN_128;
attr.m_ssci = 0x1;
attr.m_salt = "";
attr.m_authKey = "";
attr.m_sak = "";
manager.create_macsec_egress_sa(attr);
}

TEST(MACsecManager, update_macsec_sa_pn)
{
// This is a system call that may not be valid in the test environment,
Expand Down

0 comments on commit 8e224b3

Please sign in to comment.