Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
srivastavarahull committed Aug 10, 2023
1 parent 8378b4c commit ea8630b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions TestOSS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ public class TestModelDerivativeAPi
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";
static string _clientId = Environment.GetEnvironmentVariable("CLIENT_ID")!;
static string _clientSecret = Environment.GetEnvironmentVariable("CLIENT_SECRET")!;
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";
Expand All @@ -25,8 +26,9 @@ public static async Task ClassInitializeAsync(TestContext testContext)
{


// Console.WriteLine(_clientId);
// Console.WriteLine(_clientSecret);

Console.WriteLine($"CLIENT_ID: {clientId}");

Check failure on line 30 in TestOSS.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'TestModelDerivativeAPi.clientId'
Console.WriteLine($"CLIENT_SECRET: {clientSecret}");

Check failure on line 31 in TestOSS.cs

View workflow job for this annotation

GitHub Actions / build

An object reference is required for the non-static field, method, or property 'TestModelDerivativeAPi.clientSecret'
dynamic auth = await new TwoLeggedApi().AuthenticateAsync(Environment.GetEnvironmentVariable("CLIENT_ID")!,Environment.GetEnvironmentVariable("CLIENT_SECRET")!, "client_credentials", new Scope[] { Scope.BucketCreate, Scope.BucketRead, Scope.DataRead, Scope.DataWrite, Scope.DataCreate });

// Console.WriteLine(auth.ToString());
Expand Down

0 comments on commit ea8630b

Please sign in to comment.