Skip to content

Commit b4df3ea

Browse files
Use unique user IDs in integration tests to prevent false failures in CI (#195)
1 parent 1c26462 commit b4df3ea

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

integrationtests/src/test_getAccount.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void test_getAccountAndUpdate() {
4747
test.client->getAccount(session, successCallback);
4848
};
4949

50-
test.client->authenticateDevice("mytestdevice0000", std::nullopt, true, {}, successCallback);
50+
test.client->authenticateDevice(TestGuid::newGuid(), std::nullopt, true, {}, successCallback);
5151

5252
test.runTest();
5353
}

integrationtests/src/test_restoreSession.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616

1717
#include "NTest.h"
18+
#include "TestGuid.h"
1819
#include "globals.h"
1920
#include "nakama-cpp/NUtils.h"
2021

@@ -88,7 +89,7 @@ void test_restoreSession() {
8889
}
8990
};
9091

91-
test.client->authenticateDevice("mytestdevice0000", std::nullopt, true, {}, successCallback);
92+
test.client->authenticateDevice(TestGuid::newGuid(), std::nullopt, true, {}, successCallback);
9293

9394
test.runTest();
9495
}

integrationtests/src/test_storage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void test_writeStorageInvalidArgument() {
4444
test.client->writeStorageObjects(session, objects, nullptr, errorCallback);
4545
};
4646

47-
test.client->authenticateDevice("mytestdevice0000", std::nullopt, true, {}, successCallback);
47+
test.client->authenticateDevice(TestGuid::newGuid(), std::nullopt, true, {}, successCallback);
4848

4949
test.runTest();
5050
}

0 commit comments

Comments
 (0)