# Test-nginx doesn't work

**URL:** <https://www.ruby-forum.com/t/test-nginx-doesnt-work/215710>\
**Category:** NGINX\
**Created:** [January 13, 2012, 10:52am UTC](https://www.ruby-forum.com/t/test-nginx-doesnt-work/215710 "2012-01-13T10:52:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 13, 2012, 10:52am UTC](https://www.ruby-forum.com/t/test-nginx-doesnt-work/215710/1 "2012-01-13T10:52:45Z")

</div>

I’ve put test-nginx into a test directory, but it shows can’t locate  
socket.pm. Do I need to install TEST::NGINX into perl lib directory?

# ll test

总用量 60  
drwxr-xr-x 5 root root 4096 2012-01-01 08:00 ./  
drwxr-xr-x 5 simon simon 4096 2012-01-13 17:31 …/  
-rw-r–r-- 1 root root 8018 2012-01-01 08:00 Changes  
-rw-r–r-- 1 root root 298 2012-01-01 08:00 .gitignore  
drwxr-xr-x 4 root root 4096 2012-01-01 08:00 inc/  
drwxr-xr-x 3 root root 4096 2012-01-01 08:00 lib/  
-rw-r–r-- 1 root root 758 2012-01-01 08:00 Makefile.PL  
-rw-r–r-- 1 root root 749 2012-01-01 08:00 MANIFEST  
-rw-r–r-- 1 root root 303 2012-01-01 08:00 MANIFEST.SKIP  
-rw-r–r-- 1 root root 867 2012-01-01 08:00 META.yml  
-rw-r–r-- 1 root root 9851 2012-01-01 08:00 README  
drwxr-xr-x 2 root root 4096 2012-01-01 08:00 t/

# prove -r t/apply\_moves.t

t/apply\_moves.t … Can’t locate Test/Nginx/Socket.pm in @INC (@INC  
contains: /etc/perl /usr/local/lib/perl/5.10.1  
/usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5  
/usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site\_perl .) at  
t/apply\_moves.t line 2.  
BEGIN failed–compilation aborted at t/apply\_moves.t line 2.  
t/apply\_moves.t … Dubious, test returned 2 (wstat 512, 0x200)  
No subtests run

## Test Summary Report

t/apply\_moves.t (Wstat: 512 Tests: 0 Failed: 0)  
Non-zero exit status: 2  
Parse errors: No plan found in TAP output  
Files=1, Tests=0, 0 wallclock secs ( 0.02 usr + 0.01 sys = 0.03 CPU)  
Result: FAIL

Posted at Nginx Forum:

> **[test-nginx doesn't work](https://forum.nginx.org/read.php?2,221154,221154#msg-221154)**
>
> I've put test-nginx into a test directory, but it shows can't locate socket.pm. Do I need to install TEST::NGINX into perl lib directory? # ll test 总用量 60 drwxr-xr-x 5 root root 4096 2012-01-01 08:00 ./ drwxr-xr-x 5 simon simon 4096 2012-01-13 17:31...

---

<div class="post-metadata">

**Author:** ![bigplum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7c8e57/32.png) [@bigplum](https://www.ruby-forum.com/u/bigplum)\
**Post date:** [January 13, 2012, 10:58am UTC](https://www.ruby-forum.com/t/test-nginx-doesnt-work/215710/2 "2012-01-13T10:58:23Z")

</div>

Hi,

> # prove -r t/apply\_moves.t

prove -I lib -r t

Best regards,  
Piotr S. \< [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) \>

---

<div class="post-metadata">

**Author:** ![bigplum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7c8e57/32.png) [@bigplum](https://www.ruby-forum.com/u/bigplum)\
**Post date:** [January 13, 2012, 11:57am UTC](https://www.ruby-forum.com/t/test-nginx-doesnt-work/215710/3 "2012-01-13T11:57:52Z")

</div>

On Fri, Jan 13, 2012 at 5:52 PM, bigplum [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve put test-nginx into a test directory, but it shows can’t locate  
> socket.pm. Do I need to install TEST::NGINX into perl lib directory?

You need to

1. install Test::Nginx into your perl installation by running the  
following commands on shell:

In case that you have multiple perl installations in your system,  
please ensure that you’re using the right perl.

1. specify the location of Test::Nginx’s lib/ directory in your  
“prove” command line (just as Piotr S. has pointed out), that is

Regards,  
-agentzh

---

<div class="post-metadata">

**Author:** ![bigplum](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/7c8e57/32.png) [@bigplum](https://www.ruby-forum.com/u/bigplum)\
**Post date:** [January 17, 2012, 4:45am UTC](https://www.ruby-forum.com/t/test-nginx-doesnt-work/215710/4 "2012-01-17T04:45:33Z")

</div>

It’s OK now by refering to agentzh’s steps. thanks all.

Additionally, maybe it’s useful to set ftp mode before running “make”:

export BM\_UPLOAD\_FTP\_PASSIVE=“true”

otherwise this error would occur:

\*\*\* Installing dependencies…  
Can’t use an undefined value as a symbol reference at  
/usr/share/perl/5.10/Net/FTP/dataconn.pm line 54.  
Compilation failed in require at inc/Module/Install/AutoInstall.pm line  
37.

Posted at Nginx Forum:

> **[Re: test-nginx doesn't work](https://forum.nginx.org/read.php?2,221154,221340#msg-221340)**
>
> I've put test-nginx into a test directory, but it shows can't locate socket.pm. Do I need to install TEST::NGINX into perl lib directory? # ll test 总用量 60 drwxr-xr-x 5 root root 4096 2012-01-01 08:00 ./ drwxr-xr-x 5 simon simon 4096 2012-01-13 17:31...
