Berger, Daniel
2005-Jan-12 10:46 UTC
[Net-ssh-users] Getting the FQDN on Windows (was: Test Failures on
Hi, I tried running tc_http.rb at work, where I''m definitely attached to a domain. I still get the same errors I reported earlier, however. So, I tried this instead: irb(main):002:0> Socket.gethostbyname(Socket.gethostname).first => "CO3840GDJBERGEX.AD.QINTRA.COM" That seems to work, but I don''t know if that''s a better solution. Also, I still don''t think there''s a guarantee it will work on a standalone PC. I''ll try when I get home. Also note that removing "hostbased" did not seem to fix the tests. Regards, Dan
Jamis Buck
2005-Jan-12 11:06 UTC
[Net-ssh-users] Getting the FQDN on Windows (was: Test Failures on
On 09:48 Wed 12 Jan , Berger, Daniel wrote:> Hi, > > I tried running tc_http.rb at work, where I''m definitely attached to a > domain. I still get the same errors I reported earlier, however. > > So, I tried this instead: > > irb(main):002:0> Socket.gethostbyname(Socket.gethostname).first > => "CO3840GDJBERGEX.AD.QINTRA.COM" > > That seems to work, but I don''t know if that''s a better solution. Also, > I still don''t think there''s a guarantee it will work on a standalone PC. > I''ll try when I get home. > > Also note that removing "hostbased" did not seem to fix the tests.Oh, boy. I feel stupid. The reason the tests are failing is because of the way I set up the tests. In your hosts file (whatever it is called in Windows), you have to add an alias called "test.host" to your localhost. 127.0.0.1 test.host I did this in other places in the unit tests so that I could hide where the SSH server was running...but I have no idea why I did it this way in the proxy tests. Try changing the HOST constant in tc_http.rb to "localhost" and see what happens. Sorry for the run-around. - Jamis> > Regards, > > Dan > > _______________________________________________ > Net-ssh-users mailing list > Net-ssh-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/net-ssh-users-- Jamis Buck jamis_buck@byu.edu http://www.jamisbuck.org/jamis ------------------------------ "I am Victor of Borge. You will be assimil-nine-ed."
Jamis Buck
2005-Jan-12 11:29 UTC
[Net-ssh-users] Getting the FQDN on Windows (was: Test Failures on
One more change:
Index: tc_http.rb
================================================================== ---
tc_http.rb (revision 16)
+++ tc_http.rb (working copy)
@@ -56,7 +56,7 @@
end
def shutdown
- @socket.shutdown
+ @socket.close
end
end
I''m committing the above, which should make tc_http.rb work in
Windows. I''ll make a similar change to the other unit tests that start
their own server.
- Jamis
On 09:08 Wed 12 Jan , Jamis Buck wrote:> On 09:48 Wed 12 Jan , Berger, Daniel wrote:
> > Hi,
> >
> > I tried running tc_http.rb at work, where I''m definitely
attached to a
> > domain. I still get the same errors I reported earlier, however.
> >
> > So, I tried this instead:
> >
> > irb(main):002:0> Socket.gethostbyname(Socket.gethostname).first
> > => "CO3840GDJBERGEX.AD.QINTRA.COM"
> >
> > That seems to work, but I don''t know if that''s a
better solution. Also,
> > I still don''t think there''s a guarantee it will work
on a standalone PC.
> > I''ll try when I get home.
> >
> > Also note that removing "hostbased" did not seem to fix the
tests.
>
> Oh, boy. I feel stupid.
>
> The reason the tests are failing is because of the way I set up the
> tests.
>
> In your hosts file (whatever it is called in Windows), you have to add
> an alias called "test.host" to your localhost.
>
> 127.0.0.1 test.host
>
> I did this in other places in the unit tests so that I could hide
> where the SSH server was running...but I have no idea why I did it
> this way in the proxy tests.
>
> Try changing the HOST constant in tc_http.rb to "localhost" and
see
> what happens.
>
> Sorry for the run-around.
>
> - Jamis
>
> >
> > Regards,
> >
> > Dan
> >
> > _______________________________________________
> > Net-ssh-users mailing list
> > Net-ssh-users@rubyforge.org
> > http://rubyforge.org/mailman/listinfo/net-ssh-users
>
> --
> Jamis Buck
> jamis_buck@byu.edu
> http://www.jamisbuck.org/jamis
> ------------------------------
> "I am Victor of Borge. You will be assimil-nine-ed."
>
> _______________________________________________
> Net-ssh-users mailing list
> Net-ssh-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/net-ssh-users
--
Jamis Buck
jamis_buck@byu.edu
http://www.jamisbuck.org/jamis
------------------------------
"I am Victor of Borge. You will be assimil-nine-ed."