Skip to content

Commit

Permalink
Merging cluster tests for orgs api
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere committed Sep 24, 2024
1 parent 9519482 commit fbb1f5b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/Twilio.Test/ClusterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ public void SetUp()
apiKey = Environment.GetEnvironmentVariable("TWILIO_API_KEY");
toNumber = Environment.GetEnvironmentVariable("TWILIO_TO_NUMBER");
fromNumber = Environment.GetEnvironmentVariable("TWILIO_FROM_NUMBER");
orgsSid = Environment.GetEnvironmentVariable("TWILIO_ORG_SID");

Check failure on line 29 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'orgsSid' does not exist in the current context

Check failure on line 29 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'orgsSid' does not exist in the current context
clientId = Environment.GetEnvironmentVariable("TWILIO_ORGS_CLIENT_ID");

Check failure on line 30 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientId' does not exist in the current context

Check failure on line 30 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientId' does not exist in the current context
clientSecret = Environment.GetEnvironmentVariable("TWILIO_ORGS_CLIENT_SECRET");

Check failure on line 31 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientSecret' does not exist in the current context

Check failure on line 31 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientSecret' does not exist in the current context
TwilioClient.Init(username:apiKey,password:secret,accountSid:accountSid);
TwilioOrgsTokenAuthClient.Init(clientId, clientSecret);

Check failure on line 33 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientId' does not exist in the current context

Check failure on line 33 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientSecret' does not exist in the current context

Check failure on line 33 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientId' does not exist in the current context

Check failure on line 33 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'clientSecret' does not exist in the current context
}


Expand Down Expand Up @@ -122,5 +126,18 @@ public void TestListParams()
Assert.True(SinkResource.Delete(sink.Sid));

}

[Test]
[Category("ClusterTest")]
public void TestFetchingOrgsAccounts()
{
Twilio.Base.BearerToken.TokenResourceSet<Twilio.Rest.PreviewIam.Organizations.AccountResource> accountList = null;

Check failure on line 134 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Organizations' does not exist in the namespace 'Twilio.Rest.PreviewIam' (are you missing an assembly reference?)

Check failure on line 134 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Organizations' does not exist in the namespace 'Twilio.Rest.PreviewIam' (are you missing an assembly reference?)
accountList = Twilio.Rest.PreviewIam.Organizations.AccountResource.Read(pathOrganizationSid: orgsSid);

Check failure on line 135 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Organizations' does not exist in the namespace 'Twilio.Rest.PreviewIam' (are you missing an assembly reference?)

Check failure on line 135 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'orgsSid' does not exist in the current context

Check failure on line 135 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The type or namespace name 'Organizations' does not exist in the namespace 'Twilio.Rest.PreviewIam' (are you missing an assembly reference?)

Check failure on line 135 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'orgsSid' does not exist in the current context
Assert.IsNotNull(accountList.ElementAt(0).FriendlyName);

var userList = UserResource.Read(pathOrganizationSid: PathOrganizationSid);

Check failure on line 138 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'PathOrganizationSid' does not exist in the current context

Check failure on line 138 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'PathOrganizationSid' does not exist in the current context
Assert.IsNotNull(userList.ElementAt(0).Id);

Check failure on line 139 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

'UserResource' does not contain a definition for 'Id' and no accessible extension method 'Id' accepting a first argument of type 'UserResource' could be found (are you missing a using directive or an assembly reference?)

Check failure on line 139 in test/Twilio.Test/ClusterTest.cs

View workflow job for this annotation

GitHub Actions / Test

'UserResource' does not contain a definition for 'Id' and no accessible extension method 'Id' accepting a first argument of type 'UserResource' could be found (are you missing a using directive or an assembly reference?)

}
}
}

0 comments on commit fbb1f5b

Please sign in to comment.