Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
projectdiscovery
GitHub Repository: projectdiscovery/nuclei
Path: blob/dev/pkg/installer/versioncheck_test.go
2070 views
1
package installer
2
3
import (
4
"testing"
5
6
"github.com/projectdiscovery/nuclei/v3/pkg/catalog/config"
7
"github.com/projectdiscovery/utils/generic"
8
"github.com/stretchr/testify/require"
9
)
10
11
func TestVersionCheck(t *testing.T) {
12
err := NucleiVersionCheck()
13
require.Nil(t, err)
14
cfg := config.DefaultConfig
15
if generic.EqualsAny("", cfg.LatestNucleiIgnoreHash, cfg.LatestNucleiVersion, cfg.LatestNucleiTemplatesVersion) {
16
// all above values cannot be empty
17
t.Errorf("something went wrong got empty response nuclei-version=%v templates-version=%v ignore-hash=%v", cfg.LatestNucleiVersion, cfg.LatestNucleiTemplatesVersion, cfg.LatestNucleiIgnoreHash)
18
}
19
}
20
21