Skip to content

Commit bcbc4b1

Browse files
author
Sam Hanes
committed
Use hosted db for test projects
1 parent 0ec320d commit bcbc4b1

5 files changed

Lines changed: 13 additions & 10 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ addons:
99
- libunwind8
1010

1111
script:
12-
- ./build.sh Build
12+
- ./build.sh BuildTestProjects
1313

1414
install:
1515
- export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/

build.fsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ open Fake.Core.TargetOperators // for ==>
243243

244244
"Clean"
245245
==> "AssemblyInfo"
246-
==> "Build"
247-
==> "DeployTestDB"
246+
==> "Build"
248247
==> "BuildTestProjects"
248+
==> "DeployTestDB"
249249
==> "RunTests"
250250
==> "All"
251251

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<connectionStrings>
4-
<add name="AdventureWorks" connectionString="Data Source=.;Initial Catalog=AdventureWorks2012;Integrated Security=True" />
4+
<add name="AdventureWorks" connectionString="Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sqlfamily;Password=sqlf@m1ly" />
55
</connectionStrings>
66
</configuration>
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
open FSharp.Data
22

3+
[<Literal>]
4+
let connectionString = "Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sqlfamily;Password=sqlf@m1ly"
5+
36
[<EntryPoint>]
47
let main _ =
5-
let get42 = new SqlCommandProvider<"SELECT 42", "Server=.;Integrated Security=True">("Server=.;Integrated Security=True")
8+
let get42 = new SqlCommandProvider<"SELECT 42", connectionString>(connectionString)
69
get42.Execute() |> Seq.toArray |> printfn "%A"
710
0

src/SqlClient.TestProjects/SqlClient.Tests.NetCoreApp/Program.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
open FSharp.Data
22

33
[<Literal>]
4-
let cnx = "Data Source=.;Initial Catalog=AdventureWorks2012;Integrated Security=True"
4+
let Cnx = "Data Source=mhknbn2kdz.database.windows.net;Initial Catalog=AdventureWorks2012;Integrated Security=False;User ID=sqlfamily;Password=sqlf@m1ly"
55

6-
type SingleColumnSelect = SqlEnumProvider<"SELECT Name FROM Purchasing.ShipMethod", cnx>
7-
type TinyIntEnum = SqlEnumProvider<"SELECT * FROM (VALUES(('One'), CAST(1 AS tinyint)), ('Two', CAST(2 AS tinyint))) AS T(Tag, Value)", cnx, Kind = SqlEnumKind.CLI>
6+
type SingleColumnSelect = SqlEnumProvider<"SELECT Name FROM Purchasing.ShipMethod", Cnx>
7+
type TinyIntEnum = SqlEnumProvider<"SELECT * FROM (VALUES(('One'), CAST(1 AS tinyint)), ('Two', CAST(2 AS tinyint))) AS T(Tag, Value)", Cnx, Kind = SqlEnumKind.CLI>
88
type CurrencyCodeUOM =
99
SqlEnumProvider<"
1010
SELECT CurrencyCode
1111
FROM Sales.Currency
1212
WHERE CurrencyCode IN ('USD', 'EUR', 'GBP')
13-
", cnx, Kind = SqlEnumKind.UnitsOfMeasure>
13+
", Cnx, Kind = SqlEnumKind.UnitsOfMeasure>
1414

1515
[<EntryPoint>]
1616
let main _ =
17-
let get42 = new SqlCommandProvider<"SELECT 42", "Server=.;Integrated Security=True">("Server=.;Integrated Security=True")
17+
let get42 = new SqlCommandProvider<"SELECT 42", Cnx>(Cnx)
1818
get42.Execute() |> Seq.toArray |> printfn "SqlCommandTest: %A"
1919

2020
printfn "SqlEnum default test: %A" SingleColumnSelect.``CARGO TRANSPORT 5``

0 commit comments

Comments
 (0)