-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
This file is part of the updater command line interface. | ||
Copyright (C) 2024 Dirk Stolle | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using updater.software; | ||
|
||
namespace updater_test.software | ||
{ | ||
/// <summary> | ||
/// Contains tests for MariaDB_11_4. | ||
/// </summary> | ||
[TestClass] | ||
public class MariaDB_11_4_Tests: BasicSoftwareTests | ||
{ | ||
/// <summary> | ||
/// Checks whether info() returns some meaningful data. | ||
/// </summary> | ||
[TestMethod] | ||
public void Test_info() | ||
{ | ||
_info(new MariaDB_11_4(false)); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Checks whether the class implements the searchForNewer() method. | ||
/// </summary> | ||
[TestMethod] | ||
public void Test_implementsSearchForNewer() | ||
{ | ||
var mdb = new MariaDB_11_4(false); | ||
Assert.IsTrue(mdb.implementsSearchForNewer()); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Checks whether searchForNewer() returns something. | ||
/// </summary> | ||
[TestMethod] | ||
public void Test_searchForNewer() | ||
{ | ||
_searchForNewer(new MariaDB_11_4(false)); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Checks whether the class info is up to date. | ||
/// </summary> | ||
[TestMethod] | ||
public void Test_upToDate_info() | ||
{ | ||
_upToDate_info(new MariaDB_11_4(false)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
This file is part of the updater command line interface. | ||
Copyright (C) 2024 Dirk Stolle | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
using System; | ||
using updater.data; | ||
|
||
namespace updater.software | ||
{ | ||
/// <summary> | ||
/// Handles updates of MariaDB 11.4. | ||
/// </summary> | ||
public sealed class MariaDB_11_4: MariaDB_Base | ||
{ | ||
/// <summary> | ||
/// Default constructor. | ||
/// </summary> | ||
/// <param name="autoGetNewer">whether to automatically get newer | ||
/// information about the software when calling the info() method</param> | ||
public MariaDB_11_4(bool autoGetNewer) | ||
: base(autoGetNewer, "11.4") | ||
{ } | ||
|
||
|
||
/// <summary> | ||
/// Gets the currently known information about the software. | ||
/// </summary> | ||
/// <returns>Returns an AvailableSoftware instance with the known | ||
/// details about the software.</returns> | ||
public override AvailableSoftware knownInfo() | ||
{ | ||
const string version = "11.4.2"; | ||
var signature = new Signature(publisherX509, certificateExpiration); | ||
return new AvailableSoftware("MariaDB Server 11.4", | ||
version, | ||
null, // no 32-bit installer | ||
"^MariaDB 11\\.4 \\(x64\\)$", | ||
null, // no 32-bit installer | ||
new InstallInfoMsi( | ||
"https://downloads.mariadb.org/rest-api/mariadb/" + version + "/mariadb-" + version + "-winx64.msi", | ||
HashAlgorithm.SHA256, | ||
"4c0c1dc4d23ec13c02e10e5d0eb36553c4536fd949ea4ff0c6c493dd57d1cbce", | ||
signature, | ||
"/qn /norestart") | ||
); | ||
} | ||
|
||
|
||
/// <summary> | ||
/// Gets the date when this branch of MariaDB reaches its end of life. | ||
/// </summary> | ||
/// <returns>Returns the end of life date for this release branch.</returns> | ||
public override DateTime EndOfLife() | ||
{ | ||
return new DateTime(2029, 5, 29, 23, 59, 59, DateTimeKind.Utc); | ||
} | ||
} | ||
} |