From 8cd50acd5c961bd9c52f1fcbaf18ddc1015accd0 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Fri, 25 Oct 2024 15:26:31 +0200 Subject: Exports Tests: Setting a non-existent profile should work --- exports/exports_test_wrapper.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/exports/exports_test_wrapper.go b/exports/exports_test_wrapper.go index 6a56672..a52c0fe 100644 --- a/exports/exports_test_wrapper.go +++ b/exports/exports_test_wrapper.go @@ -368,8 +368,11 @@ func testSetProfileID(t *testing.T) { prfS := C.CString("idontexist") defer FreeString(prfS) pErr := getError(t, SetProfileID(prfS)) - if pErr == "" { - t.Fatal("got empty error for non-existent profile") + // this might sound wrong but it's correct! + // setting an incorrect profile should still work + // as it can be used for migrating old profiles to the new common codebase + if pErr != "" { + t.Fatal("got empty error setting non-existent profile") } prfS2 := C.CString("employees") defer FreeString(prfS2) -- cgit v1.2.3