mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-19 21:05:25 +00:00
* adds template manager * refactor: checkpoint * centrailized config & template download logic * refactor removed unused code * use global template directory * update related bug fixes * bug fix create cfg dir if missing * fix lint error * bug fix skip writing template dir in callback * misc update * remove unused code * use strings.equalfold for comparison --------- Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
20 lines
657 B
Go
20 lines
657 B
Go
package installer
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/projectdiscovery/nuclei/v2/pkg/catalog/config"
|
|
"github.com/projectdiscovery/utils/generic"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestVersionCheck(t *testing.T) {
|
|
err := NucleiVersionCheck()
|
|
require.Nil(t, err)
|
|
cfg := config.DefaultConfig
|
|
if generic.EqualsAny("", cfg.LatestNucleiIgnoreHash, cfg.LatestNucleiVersion, cfg.LatestNucleiTemplatesVersion) {
|
|
// all above values cannot be empty
|
|
t.Errorf("something went wrong got empty response nuclei-version=%v templates-version=%v ignore-hash=%v", cfg.LatestNucleiVersion, cfg.LatestNucleiTemplatesVersion, cfg.LatestNucleiIgnoreHash)
|
|
}
|
|
}
|