Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems related to TestDownloadCustomTemplatesFromGitHub test #3345

Closed
xm1k3 opened this issue Feb 20, 2023 · 5 comments · Fixed by #3918
Closed

Problems related to TestDownloadCustomTemplatesFromGitHub test #3345

xm1k3 opened this issue Feb 20, 2023 · 5 comments · Fixed by #3918
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone

Comments

@xm1k3
Copy link
Contributor

xm1k3 commented Feb 20, 2023

Nuclei version:

2.8.9

Current Behavior:

branch: dev

--- FAIL: TestDownloadCustomTemplatesFromGitHub (10.01s)
    github_test.go:31: 
        	Error Trace:	/home/runner/work/nuclei/nuclei/v2/pkg/external/customtemplates/github_test.go:31
        	Error:      	unable to find file "/tmp/template-custom-935556463/github/nuclei-templates-ehsandeep"
        	Test:       	TestDownloadCustomTemplatesFromGitHub
        	Messages:   	cloned directory does not exists

Expected Behavior:

Success test

Steps To Reproduce:

go test ./...

Anything else:

more info also here: https://github.com/projectdiscovery/nuclei/actions/runs/4223199715/jobs/7332787046

@xm1k3 xm1k3 added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Feb 20, 2023
@tarunKoyalwar
Copy link
Member

@xm1k3 , closing this since this was fixed . above unit tests downloads template from ehsandeep/nuclei-templates which was accidently deleted and it is now restored

@xm1k3
Copy link
Contributor Author

xm1k3 commented Feb 20, 2023

@tarunKoyalwar I figured that was the problem as it returned 404, I had spoken to @Mzack9999 if for future purposes we could make it more dynamic, maybe a repo under pd org, but if it is restored it's ok

@ehsandeep
Copy link
Member

This test started to fail again on windows even https://github.com/ehsandeep/nuclei-templates does exist.

--- FAIL: TestDownloadCustomTemplatesFromGitHub (42.52s)
    github_test.go:34: 
        	Error Trace:	D:/a/nuclei/nuclei/v2/pkg/external/customtemplates/github_test.go:34
        	Error:      	unable to find file "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\template-custom-13578[49](https://github.com/projectdiscovery/nuclei/actions/runs/5504540247/jobs/10030852874?pr=3916#step:6:50)[51](https://github.com/projectdiscovery/nuclei/actions/runs/5504540247/jobs/10030852874?pr=3916#step:6:52)2\\github\\nuclei-templates-ehsandeep"
        	Test:       	TestDownloadCustomTemplatesFromGitHub
        	Messages:   	cloned directory does not exists

@ehsandeep ehsandeep reopened this Jul 10, 2023
@tarunKoyalwar
Copy link
Member

tarunKoyalwar commented Jul 10, 2023

@ehsandeep , i was just looking into it. i am not able reproduce it in mac the issue only seems to be in windows tests

@tarunKoyalwar tarunKoyalwar self-assigned this Jul 10, 2023
@Mzack9999 Mzack9999 self-assigned this Jul 11, 2023
@Mzack9999
Copy link
Member

@ehsandeep, please delete and recreate your nuclei-templates fork. There is an extra space in one of the templates paths which are not compatible with Windows, causing the test to fail:
image

@ehsandeep ehsandeep linked a pull request Jul 11, 2023 that will close this issue
@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Jul 12, 2023
@ehsandeep ehsandeep added this to the nuclei v2.9.9 milestone Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants