-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 🐝 Update SDK - 1 - Generate 1.3.6 (#71)
* ci: regenerated with OpenAPI Doc , Speakeasy CLI 1.390.7 * Update project file to version 1.3.6 --------- Co-authored-by: speakeasybot <[email protected]> Co-authored-by: GitHub Actions <[email protected]>
- Loading branch information
1 parent
65781dd
commit 9da96ed
Showing
10 changed files
with
1,030 additions
and
1,020 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
namespace SmokeTest.Tests; | ||
public class EOPAContainerFixture : IAsyncLifetime | ||
{ | ||
// Note: We disable this warning because we control when/how the constructor | ||
// will be invoked for this class. | ||
// Note: We disable this warning because we control when/how the constructor | ||
// will be invoked for this class. | ||
#pragma warning disable CS8618 | ||
private IContainer _container; | ||
private IContainer _container; | ||
#pragma warning restore CS8618 | ||
|
||
public async Task InitializeAsync() | ||
{ | ||
string[] startupFiles = { | ||
public async Task InitializeAsync() | ||
{ | ||
string[] startupFiles = { | ||
"testdata/policy.rego", | ||
"testdata/weird_name.rego", | ||
"testdata/simple/system.rego", | ||
"testdata/condfail.rego", | ||
"testdata/data.json" | ||
}; | ||
string[] opaCmd = { "run", "--server", "--addr=0.0.0.0:8181", "--disable-telemetry" }; | ||
var startupCommand = new List<string>().Concat(opaCmd).Concat(startupFiles).ToArray(); | ||
string[] opaCmd = { "run", "--server", "--addr=0.0.0.0:8181", "--disable-telemetry" }; | ||
var startupCommand = new List<string>().Concat(opaCmd).Concat(startupFiles).ToArray(); | ||
|
||
// Create a new instance of a container. | ||
var container = new ContainerBuilder() | ||
.WithImage("ghcr.io/styrainc/enterprise-opa:1.23.0") | ||
.WithEnvironment("EOPA_LICENSE_TOKEN", Environment.GetEnvironmentVariable("EOPA_LICENSE_TOKEN")) | ||
.WithEnvironment("EOPA_LICENSE_KEY", Environment.GetEnvironmentVariable("EOPA_LICENSE_KEY")) | ||
// Bind port 8181 of the container to a random port on the host. | ||
.WithPortBinding(8181, true) | ||
.WithCommand(startupCommand) | ||
// Map our policy and data files into the container instance. | ||
.WithResourceMapping(new DirectoryInfo("testdata"), "/testdata/") | ||
// Wait until the HTTP endpoint of the container is available. | ||
.WithWaitStrategy(Wait.ForUnixContainer().UntilHttpRequestIsSucceeded(r => r.ForPort(8181).ForPath("/health"))) | ||
//.WithOutputConsumer(Consume.RedirectStdoutAndStderrToConsole()) // DEBUG | ||
// Build the container configuration. | ||
.Build(); | ||
// Create a new instance of a container. | ||
var container = new ContainerBuilder() | ||
.WithImage("ghcr.io/styrainc/enterprise-opa:1.23.0") | ||
.WithEnvironment("EOPA_LICENSE_TOKEN", Environment.GetEnvironmentVariable("EOPA_LICENSE_TOKEN")) | ||
.WithEnvironment("EOPA_LICENSE_KEY", Environment.GetEnvironmentVariable("EOPA_LICENSE_KEY")) | ||
// Bind port 8181 of the container to a random port on the host. | ||
.WithPortBinding(8181, true) | ||
.WithCommand(startupCommand) | ||
// Map our policy and data files into the container instance. | ||
.WithResourceMapping(new DirectoryInfo("testdata"), "/testdata/") | ||
// Wait until the HTTP endpoint of the container is available. | ||
.WithWaitStrategy(Wait.ForUnixContainer().UntilHttpRequestIsSucceeded(r => r.ForPort(8181).ForPath("/health"))) | ||
//.WithOutputConsumer(Consume.RedirectStdoutAndStderrToConsole()) // DEBUG | ||
// Build the container configuration. | ||
.Build(); | ||
|
||
// Start the container. | ||
await container.StartAsync() | ||
.ConfigureAwait(false); | ||
// DEBUG: | ||
// var (stderr, stdout) = await container.GetLogsAsync(default); | ||
// Console.WriteLine("STDERR: {0}", stderr); | ||
// Console.WriteLine("STDOUT: {0}", stdout); | ||
// Start the container. | ||
await container.StartAsync() | ||
.ConfigureAwait(false); | ||
// DEBUG: | ||
// var (stderr, stdout) = await container.GetLogsAsync(default); | ||
// Console.WriteLine("STDERR: {0}", stderr); | ||
// Console.WriteLine("STDOUT: {0}", stdout); | ||
|
||
_container = container; | ||
} | ||
public async Task DisposeAsync() | ||
{ | ||
await _container.DisposeAsync(); | ||
} | ||
_container = container; | ||
} | ||
public async Task DisposeAsync() | ||
{ | ||
await _container.DisposeAsync(); | ||
} | ||
|
||
// Expose the container for tests | ||
public IContainer GetContainer() => _container; | ||
// Expose the container for tests | ||
public IContainer GetContainer() => _container; | ||
} |
Oops, something went wrong.