diff --git a/.github/workflows/testMD.yaml b/.github/workflows/testMD.yaml index 75c88c7..172125d 100644 --- a/.github/workflows/testMD.yaml +++ b/.github/workflows/testMD.yaml @@ -5,6 +5,11 @@ on: branches: - main - master + pull_request: + branches: + - main + - master + jobs: build: runs-on: ubuntu-latest diff --git a/TestOSS.cs b/TestOSS.cs index 556520f..5e1e0e5 100644 --- a/TestOSS.cs +++ b/TestOSS.cs @@ -11,12 +11,8 @@ public class TestModelDerivativeAPi { private static OssApi ossApi= null!; private static string token; - // static string _clientId = "JuzyDAif25cIAXfZn0rAwimIAZTGLxAQ"; - // static string _clientSecret ="WR3JjH9t7wabj6LB"; string clientId = Environment.GetEnvironmentVariable("CLIENT_ID") ?? "ClientId not found"; string clientSecret = Environment.GetEnvironmentVariable("CLIENT_SECRET") ?? "ClientSecret not found"; - - // private string token = "eyJhbGciOiJSUzI1NiIsImtpZCI6IjY0RE9XMnJoOE9tbjNpdk1NU0xlNGQ2VHEwUSIsInBpLmF0bSI6Ijd6M2gifQ.eyJzY29wZSI6WyJkYXRhOnJlYWQiLCJkYXRhOndyaXRlIiwiZGF0YTpjcmVhdGUiLCJkYXRhOnNlYXJjaCIsImJ1Y2tldDpjcmVhdGUiLCJidWNrZXQ6cmVhZCIsImJ1Y2tldDp1cGRhdGUiLCJidWNrZXQ6ZGVsZXRlIiwiYWNjb3VudDpyZWFkIiwiYWNjb3VudDp3cml0ZSIsImNvZGU6YWxsIl0sImNsaWVudF9pZCI6Ikp1enlEQWlmMjVjSUFYZlpuMHJBd2ltSUFaVEdMeEFRIiwiYXVkIjoiaHR0cHM6Ly9hdXRvZGVzay5jb20vYXVkL2Fqd3RleHA2MCIsImp0aSI6ImZVajdtSGxVRWFmYUtaZmhVbURPT1JCMkZRS2tSNUMyMlptT3Zac2ppYzQ1WVBWY1BUUjJNeENKRE85N1pSbWEiLCJleHAiOjE2OTE1ODMyODF9.a8zxqD1L0eDydfqCuxL-gjT9YPfXajutgkQldSUJQnNBcDMAk_r2sluuakDh3sMYQfOakI3JdJ5zbsK1rqdrHE9Xm0VIY3Ajb4qmni5RQQFu5p5opbznFM_kQk3mguuXUFa4m7BEfoQZmenrIgrJEDESVBuQ3XW9CXRs2ZjLYquKGRQcLlVkTbRljWQnTIhx_dT05ylOJpDcpN2bi1zXgpuIw97O500DuCcVIRFv_3h_tc6LUOU6dDCwjrXpD-j8wW3WPFaEizG2ZGdnVuoLQcM9pjeM3dti_5nUNto3gbTjGT6ihRpNFE2AZntHfFIIs_0Gg5JHiCAPyMmBykgeQQ"; private string bucketKey = "juzydaif25ciaxfzn0rawimiaztglxaq-basic-app"; private const string urn = "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6anV6eWRhaWYyNWNpYXhmem4wcmF3aW1pYXp0Z2x4YXEtYmFzaWMtYXBwL2RvaXQucnZ0"; public record Token(string AccessToken, DateTime ExpiresAt); @@ -32,8 +28,6 @@ public static async Task ClassInitializeAsync(TestContext testContext) Console.WriteLine($"CLIENT_ID: {clientId}"); Console.WriteLine($"CLIENT_SECRET: {clientSecret}"); dynamic auth = await new TwoLeggedApi().AuthenticateAsync(clientId,clientSecret, "client_credentials", new Scope[] { Scope.BucketCreate, Scope.BucketRead, Scope.DataRead, Scope.DataWrite, Scope.DataCreate }); - - // Console.WriteLine(auth.ToString()); token = auth.access_token; SDKManager sdkManager = SdkManagerBuilder .Create() // Creates SDK Manager Builder itself. @@ -55,20 +49,5 @@ public async Task TestGetbucktes() Assert.IsTrue(bucketOwner != null); } - // [TestMethod] - // public async Task TestGetMetadataAsync() - // { - // ModelViews modelViewsResponse = await _mdApi.GetUrnMetadataAsync(urn, accessToken: token); - // Assert.IsTrue(modelViewsResponse.Data.Metadata.Count > 0); - // } - - // [TestMethod] - // public async Task GetThumbnailAsync() - // { - - // Stream thumbnail = await _mdApi.GetUrnThumbnailAsync(urn, WidthEnum.NUMBER_100, HeightEnum.NUMBER_100, accessToken: token); - // Assert.AreNotSame(thumbnail, null); - - // } } \ No newline at end of file diff --git a/bin/Debug/net6.0/BetaTest.dll b/bin/Debug/net6.0/BetaTest.dll index a0940bb..5ef1cf5 100644 Binary files a/bin/Debug/net6.0/BetaTest.dll and b/bin/Debug/net6.0/BetaTest.dll differ diff --git a/bin/Debug/net6.0/BetaTest.pdb b/bin/Debug/net6.0/BetaTest.pdb index d7c6442..5df5618 100644 Binary files a/bin/Debug/net6.0/BetaTest.pdb and b/bin/Debug/net6.0/BetaTest.pdb differ diff --git a/obj/Debug/net6.0/BetaTest.dll b/obj/Debug/net6.0/BetaTest.dll index a0940bb..5ef1cf5 100644 Binary files a/obj/Debug/net6.0/BetaTest.dll and b/obj/Debug/net6.0/BetaTest.dll differ diff --git a/obj/Debug/net6.0/BetaTest.pdb b/obj/Debug/net6.0/BetaTest.pdb index d7c6442..5df5618 100644 Binary files a/obj/Debug/net6.0/BetaTest.pdb and b/obj/Debug/net6.0/BetaTest.pdb differ diff --git a/obj/Debug/net6.0/ref/BetaTest.dll b/obj/Debug/net6.0/ref/BetaTest.dll index a6b5383..cfbcacb 100644 Binary files a/obj/Debug/net6.0/ref/BetaTest.dll and b/obj/Debug/net6.0/ref/BetaTest.dll differ diff --git a/obj/Debug/net6.0/refint/BetaTest.dll b/obj/Debug/net6.0/refint/BetaTest.dll index a6b5383..cfbcacb 100644 Binary files a/obj/Debug/net6.0/refint/BetaTest.dll and b/obj/Debug/net6.0/refint/BetaTest.dll differ