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

Issue #12: WINRS implémentation in Overthere #18

Closed
wants to merge 4 commits into from

Conversation

bmoussaud
Copy link

Why ? to allow to switch easily from our implementation in Java (working on all OS) to a native one - winrs - when running on windows...
The current implementation https://github.com/xebialabs/bdf-plugin/tree/master/winrm-native define a new host type: it is not very handy if you want to use back a telnet or a winrn java implementation.

The code has been validated by F.Arrault (BDF)

@vpartington
Copy link
Contributor

I can see why this is a useful addition. Switching the enum is a lot easier than creating a new Host, especially if it already contains children.

Have you extended the OverthereOnWindowsItest to include itests for this?

@bmoussaud
Copy link
Author

No because
1/I haven't found it
2/I don't know how to lauch iTest on the 'Overthere' Project

@hierynomus
Copy link
Contributor

Code looks clean.... I would like some added itests so that we don't break this functionality...

@vpartington
Copy link
Contributor

We need an itest before we can merge this.

To run the existing itests put a file called itest.properites in the overthere project directory with the content I've sent you by mail and then you can run OverthereOnUnixItest and OverthereOnWindowsItest on automatically provisioned EC2 images.

But it's not that easy because we need to run the tests ON Windows AGAINST a Windows machine. Can you Skype Jeroen and me to discuss?

@bmoussaud
Copy link
Author

I don't have the skills to configure EC2/iTest "running tests on Windows Against a Windows Machine".

Can you setup the framework for me, and I could add some tests:

diff --git a/overthere/src/test/java/com/xebialabs/overthere/OverthereOnWindowsItest.java b/overthere/src/test/java/com/xebialabs/overthere/OverthereOnWindowsItest.java
index 9345789..69c43e3 100644
--- a/overthere/src/test/java/com/xebialabs/overthere/OverthereOnWindowsItest.java
+++ b/overthere/src/test/java/com/xebialabs/overthere/OverthereOnWindowsItest.java
@@ -30,14 +30,13 @@ import static com.xebialabs.overthere.cifs.CifsConnectionBuilder.DEFAULT_TELNET_
import static com.xebialabs.overthere.cifs.CifsConnectionBuilder.DEFAULT_WINRM_CONTEXT;
import static com.xebialabs.overthere.cifs.CifsConnectionBuilder.DEFAULT_WINRM_HTTPS_PORT;
import static com.xebialabs.overthere.cifs.CifsConnectionBuilder.DEFAULT_WINRM_HTTP_PORT;
-import static com.xebialabs.overthere.cifs.CifsConnectionType.TELNET;
-import static com.xebialabs.overthere.cifs.CifsConnectionType.WINRM_HTTP;
-import static com.xebialabs.overthere.cifs.CifsConnectionType.WINRM_HTTPS;
+import static com.xebialabs.overthere.cifs.CifsConnectionType.*;

import java.io.IOException;
import java.util.Collection;
import java.util.List;

+import com.xebialabs.overthere.cifs.winrs.CifsWinRsConnection;
import org.junit.BeforeClass;
import org.junit.runners.Parameterized.Parameters;

@@ -64,6 +63,7 @@ public class OverthereOnWindowsItest extends ParametrizedOverthereConnectionItes
lopco.add(new Object[] { "cifs", createCifsTelnetOptions(), CifsTelnetConnection.class.getName() });
lopco.add(new Object[] { "cifs", createCifsWinRmHttpOptions(), CifsWinRmConnection.class.getName() });
lopco.add(new Object[] { "cifs", createCifsWinRmHttpsOptions(), CifsWinRmConnection.class.getName() });

  •    lopco.add(new Object[] { "cifs", createCifsWinRsHttpOptions(), CifsWinRsConnection.class.getName() });
            return lopco;
    }
    

@@ -102,4 +102,16 @@ public class OverthereOnWindowsItest extends ParametrizedOverthereConnectionItes
return partialOptions;
}

  • private static ConnectionOptions createCifsWinRsHttpOptions() {
  •           ConnectionOptions partialOptions = new ConnectionOptions();
    
  •           partialOptions.set(OPERATING_SYSTEM, WINDOWS);
    
  •           partialOptions.set(CONNECTION_TYPE, WINRS_HTTP);
    
  •           partialOptions.set(USERNAME, ITEST_USERNAME);
    
  •           partialOptions.set(PASSWORD, ITEST_PASSWORD);
    
  •           partialOptions.set(CONTEXT, DEFAULT_WINRM_CONTEXT);
    
  •           partialOptions.set(PORT, DEFAULT_WINRM_HTTP_PORT);
    
  •           partialOptions.set(CIFS_PORT, DEFAULT_CIFS_PORT);
    
  •       return partialOptions;
    
  • }

Le 28 oct. 2011 13:34, Vincent Partington a crit :

We need an itest before we can merge this.

To run the existing itests put a file called itest.properites in the overthere project directory with the content I've sent you by mail and then you can run OverthereOnUnixItest and OverthereOnWindowsItest on automatically provisioned EC2 images.

But it's not that easy because we need to run the tests ON Windows AGAINST a Windows machine. Can you Skype Jeroen and me to discuss?

Reply to this email directly or view it on GitHub:
#18 (comment)

@vpartington
Copy link
Contributor

I have created JIRA issue DEPLOYITPB-2719 corresponding to this as we'll also have to update overthere-plugin to take advantage of this. We can also discuss priorities there.

@vpartington
Copy link
Contributor

With issue #48 (Kerberos authentication) fixed in Overthere 2.0.0 and #59 (Negotiate authentication), #58 (WSMAN SPN) and #49 (optionally add port to SPN) to be fixed in the Overthere 2.1.0 release, all we'll need to have a complete WinRM implementation is to fix #43 (XML encryption).

I'll close this issue because I'd rather focus our efforts on getting the native Java implementation of WinRM to a feature complete state than have an implementation that only works when run from a (properly configured) Windows host and that is hard to test for people not developing such a Windows workstation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants