Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP test against the lmars-dev cluster #1289

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/IO.Ably.Shared/Defaults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,11 @@ internal static string[] GetEnvironmentFallbackHosts(string environment)
{
return new[]
{
$"{environment}-a-fallback.ably-realtime.com",
$"{environment}-b-fallback.ably-realtime.com",
$"{environment}-c-fallback.ably-realtime.com",
$"{environment}-d-fallback.ably-realtime.com",
$"{environment}-e-fallback.ably-realtime.com",
$"{environment}-a-fallback.ably-realtime-nonprod.com",
$"{environment}-b-fallback.ably-realtime-nonprod.com",
$"{environment}-c-fallback.ably-realtime-nonprod.com",
$"{environment}-d-fallback.ably-realtime-nonprod.com",
$"{environment}-e-fallback.ably-realtime-nonprod.com",
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/IO.Ably.Tests.Shared/AuthTests/AuthSandboxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ public async Task WithTokenId_WhenTryingToPublishToUnspecifiedChannel_ThrowsAbly

var token = ably.Auth.RequestTokenAsync(CreateTokenParams(capability)).Result;

var tokenAbly = new AblyRest(new ClientOptions { Token = token.Token, Environment = "sandbox" });
var tokenAbly = new AblyRest(new ClientOptions { Token = token.Token, Environment = "lmars-dev" });

var error =
await
Expand Down
8 changes: 4 additions & 4 deletions src/IO.Ably.Tests.Shared/ClientOptionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ public void Options_WithCustomEnvironment()
{
var options = new ClientOptions
{
Environment = "sandbox"
Environment = "lmars-dev"
};
options.FullRealtimeHost().Should().Be("sandbox-realtime.ably.io");
options.FullRestHost().Should().Be("sandbox-rest.ably.io");
options.FullRealtimeHost().Should().Be("lmars-dev-realtime.ably.io");
options.FullRestHost().Should().Be("lmars-dev-rest.ably.io");
options.Port.Should().Be(80);
options.TlsPort.Should().Be(443);
Assert.Equal(Defaults.GetEnvironmentFallbackHosts("sandbox"), options.GetFallbackHosts());
Assert.Equal(Defaults.GetEnvironmentFallbackHosts("lmars-dev"), options.GetFallbackHosts());
options.Tls.Should().BeTrue();
}

Expand Down
12 changes: 6 additions & 6 deletions src/IO.Ably.Tests.Shared/DefaultTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public void Defaults_WithEnvironment_ReturnsEnvironmentFallbackHosts()
{
var expectedFallBackHosts = new[]
{
"sandbox-a-fallback.ably-realtime.com",
"sandbox-b-fallback.ably-realtime.com",
"sandbox-c-fallback.ably-realtime.com",
"sandbox-d-fallback.ably-realtime.com",
"sandbox-e-fallback.ably-realtime.com",
"lmars-dev-a-fallback.ably-realtime-nonprod.com",
"lmars-dev-b-fallback.ably-realtime-nonprod.com",
"lmars-dev-c-fallback.ably-realtime-nonprod.com",
"lmars-dev-d-fallback.ably-realtime-nonprod.com",
"lmars-dev-e-fallback.ably-realtime-nonprod.com",
};
var fallbackHosts = Defaults.GetEnvironmentFallbackHosts("sandbox");
var fallbackHosts = Defaults.GetEnvironmentFallbackHosts("lmars-dev");
Assert.Equal(expectedFallBackHosts, fallbackHosts);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class TestEnvironmentSettings

public bool Tls { get; set; }

public string Environment { get; set; } = "sandbox";
public string Environment { get; set; } = "lmars-dev";

public CipherParams CipherParams { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/IO.Ably.Tests.Shared/Infrastructure/AblySandboxFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class AblySandboxFixture

public static async Task<TestEnvironmentSettings> GetSettings(string environment = null)
{
environment = environment ?? "sandbox";
environment = environment ?? "lmars-dev";
if (Settings.ContainsKey(environment))
{
return Settings[environment];
Expand All @@ -25,7 +25,7 @@ public static async Task<TestEnvironmentSettings> GetSettings(string environment
return Settings[environment];
}

private static async Task<TestEnvironmentSettings> Initialise(string environment = "sandbox")
private static async Task<TestEnvironmentSettings> Initialise(string environment = "lmars-dev")
{
var settings = new TestEnvironmentSettings
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public async Task WithFallbackHostsUseDefault_ConnectionGoesStraightToFailedInst
[Trait("spec", "RTN17b")]
public async Task WithCustomEnvironmentAndError_ConnectionGoesStraightToFailedInsteadOfDisconnected()
{
var client = await GetConnectedClient(opts => opts.Environment = "sandbox");
var client = await GetConnectedClient(opts => opts.Environment = "lmars-dev");

client.FakeProtocolMessageReceived(new ProtocolMessage(ProtocolMessage.MessageAction.Error)
{
Expand Down
4 changes: 2 additions & 2 deletions src/IO.Ably.Tests.Shared/Rest/ChannelSandboxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public async Task IdempotentPublishing_SimulateErrorAndRetry(Protocol protocol)
const int numberOfRetries = 2;
var client = await GetRestClient(protocol, opts =>
{
opts.FallbackHosts = new[] { "sandbox-rest.ably.io" };
opts.FallbackHosts = new[] { "lmars-dev-rest.ably.io" };
opts.IdempotentRestPublishing = true;
});

Expand Down Expand Up @@ -278,7 +278,7 @@ public async Task IdempotentPublishing_WithClientSpecificMessage_ShouldRetry(Pro
const int numberOfRetries = 2;
var client = await GetRestClient(protocol, opts =>
{
opts.FallbackHosts = new[] { "sandbox-rest.ably.io" };
opts.FallbackHosts = new[] { "lmars-dev-rest.ably.io" };
opts.IdempotentRestPublishing = true;
});

Expand Down
4 changes: 2 additions & 2 deletions src/IO.Ably.Tests.Shared/Rest/JwtSandboxSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public async Task Jwt_Request_ReturnType(Protocol protocol)

var authParams = new Dictionary<string, string>
{
["environment"] = "sandbox",
["environment"] = "lmars-dev",
["keyName"] = key,
["keySecret"] = secret,
["returnType"] = "jwt"
Expand Down Expand Up @@ -209,7 +209,7 @@ private async Task<string> GetJwtStringAsync(
query["capability"] = capability;
query["jwtType"] = jwtType;
query["encrypted"] = encrypted.ToString();
query["environment"] = "sandbox";
query["environment"] = "lmars-dev";
builder.Query = query.ToQueryString();

var jwtStr = await _httpClient.GetStringAsync(builder.Uri);
Expand Down
2 changes: 1 addition & 1 deletion src/IO.Ably.Tests.Shared/Rest/RestSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public async Task WithEnvironmentAndCustomHost_ShouldUseCustomHostAsIs()
{
var client = CreateClient(options =>
{
options.Environment = "sandbox";
options.Environment = "lmars-dev";
options.RestHost = "www.test.com";
});
await MakeAnyRequest(client);
Expand Down
2 changes: 1 addition & 1 deletion unity/Assets/Tests/AblySandbox/AblyCollectionFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class TestEnvironmentSettings

public bool Tls { get; set; }

public string Environment { get; set; } = "sandbox";
public string Environment { get; set; } = "lmars-dev";

public CipherParams CipherParams { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions unity/Assets/Tests/AblySandbox/AblySandboxFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public class AblySandboxFixture

public async Task<TestEnvironmentSettings> GetSettings(string environment = null)
{
environment = environment ?? "sandbox";
environment = environment ?? "lmars-dev";
if (_settings.ContainsKey(environment))
{
return _settings[environment];
}

_settings[environment] = await Initialise("sandbox");
_settings[environment] = await Initialise("lmars-dev");
return _settings[environment];
}

Expand Down
2 changes: 1 addition & 1 deletion unity/Assets/Tests/EditMode/AuthSandboxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ public IEnumerator WithTokenId_WhenTryingToPublishToUnspecifiedChannel_ThrowsAbl

var token = ably.Auth.RequestTokenAsync(CreateTokenParams(capability), null).Result;

var tokenAbly = new AblyRest(new ClientOptions { Token = token.Token, Environment = "sandbox" });
var tokenAbly = new AblyRest(new ClientOptions { Token = token.Token, Environment = "lmars-dev" });

var error =
await E7Assert.ThrowsAsync<AblyException>(tokenAbly.Channels.Get("boo").PublishAsync("test", "true"));
Expand Down
2 changes: 1 addition & 1 deletion unity/Assets/Tests/PlayMode/AuthSandboxSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ public IEnumerator WithTokenId_WhenTryingToPublishToUnspecifiedChannel_ThrowsAbl

var token = ably.Auth.RequestTokenAsync(CreateTokenParams(capability), null).Result;

var tokenAbly = new AblyRest(new ClientOptions { Token = token.Token, Environment = "sandbox" });
var tokenAbly = new AblyRest(new ClientOptions { Token = token.Token, Environment = "lmars-dev" });

var error =
await E7Assert.ThrowsAsync<AblyException>(tokenAbly.Channels.Get("boo").PublishAsync("test", "true"));
Expand Down
Loading