Skip to content
Snippets Groups Projects
Commit e217ac8a authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: Move tests with server interaction to the integration tests.

Only local testing remains in this repository.
parent cd7a0709
No related branches found
No related tags found
1 merge request!1Initial functionality
Pipeline #11399 failed
......@@ -15,7 +15,7 @@ void print_usage() {
mexPrintf("\nUsage: caosdb [OPTIONS]\n\n");
mexPrintf("Options:\n");
mexPrintf(" --help Print this help and return.\n");
mexPrintf(" --version Print the version of OcataveCaosDB and "
mexPrintf(" --version Print the version of OctaveCaosDB and "
"libcaosdb and return.\n");
mexPrintf(
" --test-connection Test the default connection and return.\n");
......
......@@ -17,4 +17,4 @@
% along with this program. If not, see <https://www.gnu.org/licenses/>.
pkg load caosdb;
moxunit_runtests -verbose test_caosdb.m;
moxunit_runtests -verbose test_unittest.m;
% This file is a part of the CaosDB Project.
%
% Copyright (C) 2021 IndiScale GmbH <info@indiscale.com>
% Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
% Copyright (C) 2021 Daniel Hornung <d.hornung@indiscale.com>
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU Affero General Public License as
......@@ -16,15 +16,24 @@
% You should have received a copy of the GNU Affero General Public License
% along with this program. If not, see <https://www.gnu.org/licenses/>.
function test_suite = test_caosdb
function test_suite=test_unittest()
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions();
test_functions=localfunctions();
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite;
end
function test_print_version
v = caosdb_exec("--version");
assertEqual(v, "v0.1 (libcaosdb v0.0.6)");
% Only tests which don't need a connection to a server.
function test_local()
% default connection
c1 = Caosdb();
assertEqual(c1.connection, "")
% class with explicit connection
c2 = Caosdb(connection = "local-caosdb-admin");
assertEqual(c2.connection, "local-caosdb-admin");
% Only get the local versions.
version = caosdb_exec("--version");
assertEqual(version, "v0.1 (libcaosdb v0.0.6)");
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment