tag:help.appveyor.com,2012-11-13:/discussions/questions/51723-is-it-possible-to-disconnect-the-internet-before-running-a-test-in-appveyor-buildAppVeyor: Discussion 2020-12-04T03:45:20Ztag:help.appveyor.com,2012-11-13:Comment/488683442020-12-02T04:38:48Z2020-12-02T04:38:48ZIs it possible to disconnect the internet before running a test in AppVeyor build? <div><p>Actually, you can perform the tests with VM disconnected from internet. The only trick here you should reboot VM after tests, so build agent could reconnect on boot:</p>
<pre>
<code>- ps: Get-NetAdapter | format-table
- ps: Disable-NetAdapter -Name "Ethernet 4" -Confirm:$false
- <your tests go here>
- ps: Start-Sleep -s 5; Restart-Computer
- ps: Start-Sleep -s 5
- ps: <output or upload results></code>
</pre>
<p>You will be able to print/push test results after reboot.</p>
<p>Hope that helps.</p>
<p>PS: Don't forget to enable adapter before reboot.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/488683442020-12-04T03:45:17Z2020-12-04T03:45:17ZIs it possible to disconnect the internet before running a test in AppVeyor build? <div><p>Thanks Feodor for the suggestion. I will give it a try.</p></div>weerayuth_r