Skip to content

Commit

Permalink
Testing for PR
Browse files Browse the repository at this point in the history
  • Loading branch information
srivastavarahull committed Aug 10, 2023
1 parent 7225e9a commit 3da8893
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/testMD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:
build:
runs-on: ubuntu-latest
Expand Down
21 changes: 0 additions & 21 deletions TestOSS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ public class TestModelDerivativeAPi
{
private static OssApi ossApi= null!;
private static string token;

Check warning on line 13 in TestOSS.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'token' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.
// 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);
Expand All @@ -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.
Expand All @@ -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);

// }

}
Binary file modified bin/Debug/net6.0/BetaTest.dll
Binary file not shown.
Binary file modified bin/Debug/net6.0/BetaTest.pdb
Binary file not shown.
Binary file modified obj/Debug/net6.0/BetaTest.dll
Binary file not shown.
Binary file modified obj/Debug/net6.0/BetaTest.pdb
Binary file not shown.
Binary file modified obj/Debug/net6.0/ref/BetaTest.dll
Binary file not shown.
Binary file modified obj/Debug/net6.0/refint/BetaTest.dll
Binary file not shown.

0 comments on commit 3da8893

Please sign in to comment.