-
Notifications
You must be signed in to change notification settings - Fork 0
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
Major Repo Updates #2
base: main
Are you sure you want to change the base?
Conversation
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
Hey, thanks for the update, again. I got some time to check it out today, and I could get the CE to start a container, but I'm not sure how to use the more specific containers. open Expecto
open Expecto.Flip
open FsToolkit
open Fs.TestContainers.Image
open Fs.TestContainers.Container
open Testcontainers
open DotNet.Testcontainers.Builders
open System
open DotNet.Testcontainers.Containers
let inline dump a =
a
|> Dumpify.DumpExtensions.Dump
let inline dumpt a =
a
|> Dumpify.DumpExtensions.DumpText
|> printfn "%s"
|> ignore
let inline dumpi a =
a
|> Dumpify.DumpExtensions.Dump
|> ignore
[<Tests>]
let newApiTestContainerTests =
testList "here is a stub for the stuff that I'm gonna do" [
testCase
"TestContainer"
(fun () ->
let container =
container { imageName "mcr.microsoft.com/mssql/server:2022-CU10-ubuntu-22.04" }
|> ContainerBuilder.build
container.StartAsync()
|> Async.AwaitTask
|> Async.RunSynchronously
container.IpAddress
|> dumpi
let msSql =
MsSql
.MsSqlBuilder()
.WithImage("mcr.microsoft.com/mssql/server:2022-CU10-ubuntu-22.04")
.Build()
msSql.StartAsync()
|> Async.AwaitTask
|> Async.RunSynchronously
msSql
|> dumpi
"
CREATE DATABASE TestDb;
create table TestTable (id int, name varchar(255));
insert into TestTable (id, name) values (1, 'test');
insert into TestTable (id, name) values (2, 'test2');
"
|> msSql.ExecScriptAsync
|> Async.AwaitTask
|> Async.RunSynchronously
|> ignore
let execResult =
"
select * from TestTable;
"
|> msSql.ExecScriptAsync
|> Async.AwaitTask
|> Async.RunSynchronously
execResult.Stdout
|> dumpi
they both start, and have the same image in them, but I cannot, for instance, seem to use the ExecScriptAsync that comes from The MsSql.MsqlBuilder. is there a way to get those specific containers to work with the CE? |
Proposed Changes
Making updates per #1. This supports v3.9 of DotNet.TestContainers.
Types of changes
Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
This is the just a first pass at creating the CI/CD pipeline, tooling updates, and API support. If momentum is gained, we can iterate on the current package.