Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Gielniewski <[email protected]>
  • Loading branch information
adigie committed Feb 25, 2025
1 parent ee2397a commit 9f0f05a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/app/tests/TestFailSafeContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <lib/core/StringBuilderAdapters.h>
#include <lib/support/CHIPMem.h>
#include <lib/support/CodeUtils.h>
#include <lib/support/TestPersistentStorageDelegate.h>
#include <platform/CHIPDeviceLayer.h>

using namespace chip;
Expand Down Expand Up @@ -66,8 +67,11 @@ class TestFailSafeContext : public ::testing::Test

TEST_F(TestFailSafeContext, TestFailSafeContext_ArmFailSafe)
{
chip::TestPersistentStorageDelegate testStorage;
chip::app::FailSafeContext failSafeContext;

failSafeContext.Init({ &testStorage });

EXPECT_EQ(failSafeContext.ArmFailSafe(kTestAccessingFabricIndex1, System::Clock::Seconds16(1)), CHIP_NO_ERROR);
EXPECT_TRUE(failSafeContext.IsFailSafeArmed());
EXPECT_EQ(failSafeContext.GetFabricIndex(), kTestAccessingFabricIndex1);
Expand All @@ -80,8 +84,11 @@ TEST_F(TestFailSafeContext, TestFailSafeContext_ArmFailSafe)

TEST_F(TestFailSafeContext, TestFailSafeContext_NocCommandInvoked)
{
chip::TestPersistentStorageDelegate testStorage;
chip::app::FailSafeContext failSafeContext;

failSafeContext.Init({ &testStorage });

EXPECT_EQ(failSafeContext.ArmFailSafe(kTestAccessingFabricIndex1, System::Clock::Seconds16(1)), CHIP_NO_ERROR);
EXPECT_EQ(failSafeContext.GetFabricIndex(), kTestAccessingFabricIndex1);

Expand Down

0 comments on commit 9f0f05a

Please sign in to comment.