OpenNebula / one

The open source Cloud & Edge Computing Platform bringing real freedom to your Enterprise Cloud 🚀
http://opennebula.io
Apache License 2.0
1.26k stars 484 forks source link

Improve tests for Go API #6238

Open paczerny opened 1 year ago

paczerny commented 1 year ago

Description Actual (release 6.6) tests for Go API has very low coverage of the API. Every API call should be present in the tests. The structure of the tests for most files is not nice. For all tests files use the gopkg with setup and tear down methods, each test should be one method. See vm_test.go as an example

Use case Better confidence in Go api.

Interface Changes Fix any issues in Go API revealed by new tests

Progress Status

API tests for:

paczerny commented 1 year ago

The go test supports statistics for test coverage, run:

go test -coverprofile=coverage.out
go tool cover -html=coverage.out