mirror of
https://github.com/Smaug123/PulumiConfig
synced 2025-10-23 00:28:40 +00:00
Bump versions of test libs (#40)
This commit is contained in:
@@ -13,13 +13,13 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FsCheck" Version="3.0.0-rc3" />
|
||||
<PackageReference Include="FsUnit" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
<PackageReference Include="NJsonSchema" Version="11.1.0" />
|
||||
<PackageReference Include="NJsonSchema.NewtonsoftJson" Version="11.1.0" />
|
||||
<PackageReference Include="NUnit" Version="4.3.1" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
|
||||
<PackageReference Include="FsCheck" Version="3.3.1" />
|
||||
<PackageReference Include="FsUnit" Version="7.1.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
||||
<PackageReference Include="NJsonSchema" Version="11.5.1" />
|
||||
<PackageReference Include="NJsonSchema.NewtonsoftJson" Version="11.5.1" />
|
||||
<PackageReference Include="NUnit" Version="4.4.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -15,12 +15,13 @@ module TestSchema =
|
||||
|
||||
[<Test>]
|
||||
let ``Example conforms to schema`` () =
|
||||
task {
|
||||
let executing = Assembly.GetExecutingAssembly().Location |> FileInfo
|
||||
|
||||
let schemaFile =
|
||||
Utils.findFileAbove "PulumiWebServer/config.schema.json" executing.Directory
|
||||
|
||||
let schema = JsonSchema.FromJsonAsync(File.ReadAllText schemaFile.FullName).Result
|
||||
let! schema = JsonSchema.FromJsonAsync (File.ReadAllText schemaFile.FullName)
|
||||
|
||||
let json = Utils.getEmbeddedResource typeof<Utils.Dummy>.Assembly "config.json"
|
||||
|
||||
@@ -28,6 +29,7 @@ module TestSchema =
|
||||
let errors = validator.Validate (json, schema)
|
||||
|
||||
errors |> shouldBeEmpty
|
||||
}
|
||||
|
||||
[<Test>]
|
||||
let ``Example can be loaded`` () =
|
||||
@@ -40,8 +42,8 @@ module TestSchema =
|
||||
writer.WriteLine config
|
||||
writer.Flush ()
|
||||
|
||||
stream.Seek (0L, SeekOrigin.Begin) |> ignore
|
||||
Configuration.get stream |> ignore
|
||||
stream.Seek (0L, SeekOrigin.Begin) |> ignore<int64>
|
||||
Configuration.get stream |> ignore<Configuration>
|
||||
|
||||
[<Test>]
|
||||
[<Explicit "Run this to regenerate the schema file">]
|
||||
|
@@ -1,16 +1,3 @@
|
||||
#!/usr/bin/python3
|
||||
#!/bin/sh
|
||||
|
||||
import subprocess
|
||||
|
||||
def check_fantomas():
|
||||
result = subprocess.run(["dotnet", "tool", "run", "fantomas", "--check", "."])
|
||||
if result.returncode != 0:
|
||||
raise Exception(f"Formatting incomplete (return code: {result.returncode}). Consider running `dotnet tool run fantomas .`")
|
||||
|
||||
|
||||
def main():
|
||||
check_fantomas()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
dotnet tool run fantomas --check .
|
||||
|
Reference in New Issue
Block a user