Commit 14688876 authored by Greg Williams's avatar Greg Williams
Browse files

Fixed regression in metadata copy post successful GET

parent 8c5388b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ KineticStatus KineticClient_Put(KineticSessionHandle handle,
            // If both buffers supplied, copy newVersion into dbVersion, and clear newVersion
            if (entry->dbVersion.array.data != NULL && entry->dbVersion.array.len > 0) {
                ByteBuffer_Reset(&entry->dbVersion);
                ByteBuffer_Append(&entry->dbVersion, entry->dbVersion.array.data, entry->dbVersion.bytesUsed);
                ByteBuffer_Append(&entry->dbVersion, entry->newVersion.array.data, entry->newVersion.bytesUsed);
                ByteBuffer_Reset(&entry->newVersion);
            }

+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ uint8_t data[KINETIC_OBJ_SIZE];

void SystemTestSetup(SystemTestFixture* fixture)
{
    KineticClient_Init("stdout", 1);
    KineticClient_Init("stdout", 2);

    TEST_ASSERT_NOT_NULL_MESSAGE(fixture, "System test fixture is NULL!");

+2 −5
Original line number Diff line number Diff line
@@ -232,11 +232,8 @@ void test_Put_should_update_object_data_on_device_and_update_version(void)
    KineticStatus status = KineticClient_Put(Fixture.handle, &Entry);
    TEST_ASSERT_EQUAL_KineticStatus(KINETIC_STATUS_SUCCESS, status);

    TEST_ASSERT_EQUAL_ByteArray(NewVersion, Entry.dbVersion.array);
    TEST_ASSERT_EQUAL_ByteArray(Tag, Entry.tag.array);
    TEST_ASSERT_ByteArray_NONE(Entry.newVersion.array);
    TEST_ASSERT_ByteBuffer_NULL(Entry.newVersion);

    TEST_ASSERT_ByteBuffer_EMPTY(Entry.newVersion);
    TEST_ASSERT_EQUAL_ByteBuffer(NewVersionBuffer, Entry.dbVersion);
    TEST_ASSERT_EQUAL_ByteArray(Key, Entry.key.array);
    TEST_ASSERT_EQUAL_ByteArray(Tag, Entry.tag.array);