comparison PostgreSQL/UnitTests/PostgreSQLTests.cpp @ 417:15bfd9a76f8d pg-transactions

merge
author Alain Mazy <am@osimis.io>
date Fri, 23 Jun 2023 14:26:58 +0200
parents 91124cc8a8c7
children ecd0b719cff5
comparison
equal deleted inserted replaced
370:d2b5d9c92214 417:15bfd9a76f8d
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium 4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium 5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium 6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
7 * 7 *
8 * This program is free software: you can redistribute it and/or 8 * This program is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU Affero General Public License 9 * modify it under the terms of the GNU Affero General Public License
10 * as published by the Free Software Foundation, either version 3 of 10 * as published by the Free Software Foundation, either version 3 of
11 * the License, or (at your option) any later version. 11 * the License, or (at your option) any later version.
540 TEST(PostgreSQLIndex, CreateInstance) 540 TEST(PostgreSQLIndex, CreateInstance)
541 { 541 {
542 OrthancDatabases::PostgreSQLIndex db(NULL, globalParameters_); 542 OrthancDatabases::PostgreSQLIndex db(NULL, globalParameters_);
543 db.SetClearAll(true); 543 db.SetClearAll(true);
544 544
545 std::unique_ptr<OrthancDatabases::DatabaseManager> manager(OrthancDatabases::IndexBackend::CreateSingleDatabaseManager(db)); 545 std::list<OrthancDatabases::IdentifierTag> tags;
546 std::unique_ptr<OrthancDatabases::DatabaseManager> manager(OrthancDatabases::IndexBackend::CreateSingleDatabaseManager(db, false, tags));
546 547
547 std::string s; 548 std::string s;
548 ASSERT_TRUE(db.LookupGlobalProperty(s, *manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseInternal1)); 549 ASSERT_TRUE(db.LookupGlobalProperty(s, *manager, MISSING_SERVER_IDENTIFIER, Orthanc::GlobalProperty_DatabaseInternal1));
549 ASSERT_EQ("2", s); 550 ASSERT_EQ("2", s);
550 551