Skip to content

Latest commit

 

History

106 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

Codacy Badge

Rundeck.Api

API for Rundeck

Nuget

Running the tests

Every test calls a live Rundeck, so the tests run locally, not in CI. The repository includes a disposable Rundeck 3.2.3 in Docker whose API token is in Dockerfiles/tokens.properties. It is a local test server with no production data.

  1. Tell the tests where the server is. Settings come from user secrets (UserSecretsId rundeck-api-tests), never from a file in the repository:

    $p = '.\Rundeck.Api.Test\Rundeck.Api.Test.csproj'
    dotnet user-secrets set 'Rundeck:Uri' 'http://127.0.0.1:4440' --project $p
    dotnet user-secrets set 'Rundeck:Token' '<the admin token from Dockerfiles/tokens.properties>' --project $p
    dotnet user-secrets set 'Rundeck:Username' 'admin' --project $p

    Environment variables (Rundeck__Uri, Rundeck__Token, Rundeck__Username) work too, and override user secrets. Rundeck.Api.Test/appsettings.example.json shows the shape.

  2. Start the server and run the tests: .\StartDockerAndTest.ps1. Stop the server with .\StopDocker.ps1.

Test classes share one server and one Test project, so they do not run in parallel (parallelizeTestCollections: false in xunit.runner.json).

About

API for Rundeck

Resources

Contributing

Security policy

Stars

3 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages