Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/scrutiny/src/commit/54f6fe06af82d43f0cdd68f3a00ef50a9c4f3bec/collector/pkg/errors/errors_test.go You should set ROOT_URL correctly, otherwise the web may not work correctly.
scrutiny/collector/pkg/errors/errors_test.go

35 lines
862 B

package errors_test
import (
"github.com/analogj/scrutiny/collector/pkg/errors"
"github.com/stretchr/testify/require"
"testing"
)
//func TestCheckErr_WithoutError(t *testing.T) {
// t.Parallel()
//
// //assert
// require.NotPanics(t, func() {
// errors.CheckErr(nil)
// })
//}
//func TestCheckErr_Error(t *testing.T) {
// t.Parallel()
//
// //assert
// require.Panics(t, func() {
// errors.CheckErr(stderrors.New("This is an error"))
// })
//}
func TestErrors(t *testing.T) {
t.Parallel()
//assert
require.Implements(t, (*error)(nil), errors.ConfigFileMissingError("test"), "should implement the error interface")
require.Implements(t, (*error)(nil), errors.ConfigValidationError("test"), "should implement the error interface")
require.Implements(t, (*error)(nil), errors.DependencyMissingError("test"), "should implement the error interface")
}