Commit graph

4 commits

Author SHA1 Message Date
Jared Camins-Esakov
a6c7ba8519 Bug 9191: updatedatabase.pl should only run updates up to the current version
Check whether a given update should be run when passed the proposed
version number. The update will always be run if the proposed version
is greater than the current database version and less than or equal to
the version returned by C4::Context->final_linear_version (initially set
to be equal to the version in kohaversion.pl). The update is also run if
the version contains XXX, though this behavior will be changed following
the adoption of non-linear updates as implemented in bug 7167.

To test:
1) Make sure that the first example database update added by this patch
   in installer/data/mysql/updatedatabase.pl has a version number one
   greater than the version of Koha you have installed.
2) Set the Version syspref back one version behind your current version.
3) Navigate to the main page of the staff client, and log in to the
   installer.
4) Confirm that the update page claims to have rerun the previous update
   and has displayed the log message:
   "Upgrade to 3.11.00.XXX done (Bug 9191: You should see this)"
   but not the log message:
   "Upgrade to [version number] done (Bug 9191: You shouldn't see this)"

Note: the sample database revisions will be removed by the RM before
this patch is pushed to master.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
works great

Signed-off-by: Elliott Davis <elliott@test.bywatersolutions.com>
Works as expected.  Test plan is great. Code looks to be adherent to standards.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-12-11 08:19:00 -05:00
Jared Camins-Esakov
4b65389d5e Bug 9005: Allow user to disable syspref cache
Because C4::Context uses an in-memory hash for caching sysprefs,
changing a syspref under a multi-threaded persistent environment
requires a server restart. This patch makes it possible disable
the syspref cache.

To test:
1) If you are using a multi-threaded persistent server (Starman, etc.),
   change a syspref and note that the effects of the syspref change may
   or may not be visible on any given request before applying this patch.
   You will need to choose a syspref with obvious effects that can be
   seen by simply refreshing the page. I recommend enabling or
   disabling additional languages in the OPAC, since you can refresh the
   page a dozen times and reasonably expect to see the new behavior you
   set only 1/n of the time.
2) Apply patch.
3) Add "C4::Context->disable_syspref_cache();" to your koha.psgi file
4) Repeat step 1, noting that you never see the stale behavior.
5) Run test at t/db_dependent/Context.t.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
All tests passed.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2012-11-08 12:41:10 -05:00
d243847c0a more test case fixes
SQLHelper.t - clean up after itself better
Context.t - fix reporting of test plan

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 11:56:32 -04:00
Galen Charlton
156cbf4eb6 DB-dependent tests moved
Moved test cases that depend on the DBMS and having
an initialized Koha database to a subdirectory
of t so that they will not be swept up into
the default 'make test'.  Goal is to have
these DB-dependent tests runnable either via
a special make target or perhaps from the
web installer.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-01-08 14:07:38 -06:00
Renamed from t/Context.t (Browse further)