From 372e34943f9dcda1b2305479ad661a69c8d72b67 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Thu, 2 Aug 2018 15:29:33 -0500 Subject: [PATCH] Added some stuff to test the updater --- IPA.Tests/IPA.Tests.csproj | 1 + IPA.Tests/updater_test.json | 52 +++++++++++++++++++ .../Updating/ModsaberML/ApiEndpoint.cs | 4 +- IllusionPlugin/BeatSaber/ModsaberModInfo.cs | 2 +- 4 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 IPA.Tests/updater_test.json diff --git a/IPA.Tests/IPA.Tests.csproj b/IPA.Tests/IPA.Tests.csproj index d4919d23..9765195f 100644 --- a/IPA.Tests/IPA.Tests.csproj +++ b/IPA.Tests/IPA.Tests.csproj @@ -66,6 +66,7 @@ + diff --git a/IPA.Tests/updater_test.json b/IPA.Tests/updater_test.json new file mode 100644 index 00000000..2f658fdf --- /dev/null +++ b/IPA.Tests/updater_test.json @@ -0,0 +1,52 @@ +{ + "mods": [ + { + "name": "bsipa-test-plugin", + "version": "0.0.1", + "approved": true, + "title": "BSIPA Test Plugin", + "description": "", + "type": "mod", + "published": "2018-08-02T03:12:18.805Z", + "gameVersion": "0.11.1", + "gameVersionID": "5b626bb15d243a0008b8886e", + "oldVersions": [], + "dependsOn": [], + "conflictsWith": [], + "files": { + "steam": { + "hash": "b38f5f58b0131e10d4676cc94dad5315e2999aa8", + "files": { + "CustomSongs/One More Time/": "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "CustomSongs/One More Time/cover.jpg": "95dbaecba1ac8165f4cd0a83950a31859931db27", + "CustomSongs/One More Time/Credits.txt": "d067a9f5e0e7c6301dd9f6e8e7a609e82815345c", + "CustomSongs/One More Time/Easy.json": "e93e234a6fd38afc3d216e6d0e1585f19cb49f69", + "CustomSongs/One More Time/Expert.json": "8bd7f7e0e0782dce7b77a3bc8bdbc091f2fd202f", + "CustomSongs/One More Time/Hard.json": "99e693c77d280c37a6cfd9f479f158cd6c84a354", + "CustomSongs/One More Time/info.json": "d214d1990af6debf38ccfdb7c57462926fb0995c", + "CustomSongs/One More Time/lyrics.srt": "b3ed8a5f4fc3595fb097943379fc8ea22548bd51", + "CustomSongs/One More Time/Normal.json": "0f7c68b29dfb8c5cfde34b0dc3238353e2f9b24b", + "CustomSongs/One More Time/One More Time.ogg": "4d74e9a58341439299512dce2155c97a00d3fb3b", + "IPA.exe": "57521373f240845798bb99723ceb19ee09774131", + "IPA/Backups/": "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "IPA/Data/": "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "IPA/Data/Managed/": "da39a3ee5e6b4b0d3255bfef95601890afd80709", + "IPA/Data/Managed/IllusionInjector.dll": "b7f05f3c7abc052fab29787e97dfa5533ce8ff7d", + "IPA/Data/Managed/IllusionInjector.pdb": "a4ca3e2aada545eae600a6b8971ca892682b6693", + "IPA/Data/Managed/IllusionPlugin.dll": "c715be1506e16367c6cdb1c8e7b8bba845233f0f", + "IPA/Data/Managed/IllusionPlugin.pdb": "516f73cc420bfcdcd38a991c7664d62d7deb745a", + "IPA/Data/Managed/IllusionPlugin.xml": "e79c7cd5bc5369056d262fd963451e4fb22f8021", + "IPA/Launcher.exe": "76a68378dd0ef1fe660b87b96b18c5e77709e3ff", + "Mono.Cecil.dll": "762fb07e4d81722f0a766460289c6114cd4b7dae", + "Plugins/SongLoaderPlugin.dll": "f4ab080fbcc5abc6005a868cd965920bac46ddaf" + }, + "url": "https://www.modsaber.ml/cdn/song-loader/4.2.2-default.zip" + } + }, + "weight": 7, + "author": "danike", + "authorID": "5b62723f288b110008291cb9" + } + ], + "lastPage": 0 +} \ No newline at end of file diff --git a/IllusionInjector/Updating/ModsaberML/ApiEndpoint.cs b/IllusionInjector/Updating/ModsaberML/ApiEndpoint.cs index a4d3d047..f18956f8 100644 --- a/IllusionInjector/Updating/ModsaberML/ApiEndpoint.cs +++ b/IllusionInjector/Updating/ModsaberML/ApiEndpoint.cs @@ -10,8 +10,8 @@ namespace IllusionInjector.Updating.ModsaberML class ApiEndpoint { #if DEBUG - public const string ApiBase = "https://www.modsaber.ml/api/"; - public const string GetApprovedEndpoint = "public/temp/approved"; + public const string ApiBase = "file://Z:/Users/aaron/Source/Repos/IPA-Reloaded-BeatSaber/IPA.Tests/"; + public const string GetApprovedEndpoint = "updater_test.json"; #else public const string ApiBase = "https://www.modsaber.ml/api/"; public const string GetApprovedEndpoint = "public/temp/approved"; diff --git a/IllusionPlugin/BeatSaber/ModsaberModInfo.cs b/IllusionPlugin/BeatSaber/ModsaberModInfo.cs index 52942af3..9acb730c 100644 --- a/IllusionPlugin/BeatSaber/ModsaberModInfo.cs +++ b/IllusionPlugin/BeatSaber/ModsaberModInfo.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace IllusionPlugin.BeatSaber { - public class ModsaberModInfo + public struct ModsaberModInfo { public string InternalName { get; set; } public Version CurrentVersion { get; set; }