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

Define a method for creating a Loopback adapter for use in integration testing network resource #90

Closed
PlagueHO opened this issue Feb 3, 2016 · 9 comments · Fixed by #108

Comments

@PlagueHO
Copy link
Member

PlagueHO commented Feb 3, 2016

I'm actively working on this issue now so I thought I'd set it as an issue so it can be tracked.

I'm attempting to create a cmdlet/function that will create a named Loopback adapter configured with TCP/IP.

I've made some progress with this, but at the moment it requires a file called Devcon.exe that is part of the WDK (Windows Driver Kit) to create the Loopback adapter device. The WDK is a 800MB download (too large to download and install as part of CI) with a 2.5GB install. So I might need to locate alternate download locations for this file (it's only a 40kb).

I'll ensure everything else works and then tackle the problem of obtaining Devcon.exe.

@tysonjhayes
Copy link
Collaborator

Wonder if we can get devcon into a nuget or chocolatey package to just get devcon.exe? That would solve the problem of the download of the exe.

@PlagueHO
Copy link
Member Author

PlagueHO commented Feb 3, 2016

@tysonjhayes - good idea! I took a quick scan of Chocolatey in case someone had already done it - but no dice. But I'm sure packaging this is technically easy enough though, the question comes down to whether the app is allowed to be distributed this way (licensing issue?) - I'd think so as it seems to come with lots of different drivers.

@PlagueHO
Copy link
Member Author

PlagueHO commented Feb 4, 2016

Actually, I don't see why we shouldn't build this into a choco package- the source code for Devcon is up on GitHub anyway.

I'll see if I can package it up.

@PlagueHO
Copy link
Member Author

PlagueHO commented Feb 4, 2016

I've created a new repo that contains a Chocolatey package definition for devcon.exe.

The repo has an AppVeyor.yml definition that clones the devcon.exe source code from the MS Repo on GitHub (linked previously), builds the DevCon.exe and then packages it into a Chocolatey package. The package then gets uploaded as an AppVeyor.yml artifact.

It isn't currently automatically pushing it to Chocolatey - I'm doing that manually right now.

I've uploaded the package to Chocolatey but it hasn't yet been reviewed so it can't be seen yet. If you have a Chocolatey account I can add you as a maintainer if you want?

@tysonjhayes
Copy link
Collaborator

Good find! That should make it easier if we can just pull it down from some where.

@PlagueHO
Copy link
Member Author

PlagueHO commented Feb 4, 2016

Cheers! I'm going to also convert the Loopback adapter creation and removal code into a PS Module and upload that into PowerShell Gallery. Are these new repos I'm creating worth transferring over to you? It might be best to keep any Integration test dependencies under the same authority as the xNetworking repo I was thinking.

Anyway, Chocolatey has accepted the Devcon.portable package:
https://chocolatey.org/packages/devcon.portable/10.0.10586.0

Can install a new Loopback adapter with:

devcon install c:\windows\inf\netloop.inf *MSLOOP

I'm putting all this into the LoopbackAdapter PS Module.

@PlagueHO
Copy link
Member Author

PlagueHO commented Feb 5, 2016

Quick update:

I had to rebuild my Chocolatey package because I needed both 32-bit and 64-bit versions of DevCon.exe in it. So I've resubmitted it - waiting for package approval now.

In the meantime I wrote a PS module for managing Loopback Adapters. I've uploaded this to PowerShell Gallery, but haven't released it yet because it requires the Chocolatey package to be available.

So once all that is done I can submit the PR with the integration tests that use the Loopback Adapter module.

@PlagueHO
Copy link
Member Author

Update: Finally got the Chocolatey package accepted - they had to verify the DevCon.exe bits were actually the ones in the WDK.

So have released the Loopback Adapter module now, which is required by these tests.

@PlagueHO
Copy link
Member Author

PlagueHO commented Mar 8, 2016

Nearly forgot about this one. Will try and get some work done on it later this week.

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 a pull request may close this issue.

2 participants