Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Fix problem shutting down interfaces with names like wlan0-foobar sin… #109

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f292e8a
Support for setting up access points using hostapd and dnsmasq
foosel Aug 29, 2014
13eb68b
Fixed unit test
foosel Aug 29, 2014
5ec6d7c
Merge branch 'manage_missing_writeaccess'
foosel Aug 29, 2014
c839b9c
Removed hostapd output check again, doesn't always work
foosel Sep 2, 2014
1712f18
Merge branch 'access_point_support'
foosel Sep 2, 2014
064f323
Added install_extras/uninstall_extras commands to install bash comple…
foosel Sep 3, 2014
6a7ad6a
Allow configuration of Hostapd, Dnsmasq and Scheme implementation use…
foosel Sep 3, 2014
dc9091f
Fire up hostapd first, then scheme, then dnsmasq
foosel Sep 29, 2014
87667f0
Added some more logging output to wifi commands
foosel Sep 30, 2014
9e73244
Also catch any subprocess exceptions thrown by ifup and interpret the…
foosel Jan 21, 2015
60f664e
Added output to caught CalledProcessError logging upon trying to acti…
foosel Jan 28, 2015
59ec94e
Added .iml files (IntelliJ project files) to gitignore
foosel Jan 31, 2015
6503285
Raise InterfaceError instead of ConnectionError when call to ifup fai…
foosel Feb 4, 2015
f565751
Forgot an import
foosel Feb 4, 2015
35775c0
WEP passkeys in plaintext need to be prefixed with "s:" in order to f…
foosel Feb 5, 2015
14f1003
Fixed unit test
foosel Feb 5, 2015
da6aee1
Merge branch 'fix/wepPasskey'
foosel Feb 5, 2015
6c776b6
Reverted 35775c0924ecc122401595c169661e6b24d40b0d and 14f100386f34d78…
foosel Feb 10, 2015
8bb9fa6
Now only prefix obvious ASCII web keys with the s: parameter
foosel Feb 10, 2015
b7c6ed4
Fix problem shutting down interfaces with names like wlan0-foobar sin…
knro Mar 19, 2017
ef8a44a
Merge with foosel fork
knro Mar 19, 2017
43e0582
Add missing bin file
knro Mar 19, 2017
a9eb52f
Do not fail if interface is already configured
knro Apr 23, 2017
04c885e
Use interface
knro Apr 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed unit test
Forgot to adjust some expected values after switching scheme to multidicts,
sorry, fixed now.
  • Loading branch information
foosel committed Aug 29, 2014
commit 13eb68b25d5ce3c1b947d9a173c8bc1a4091a09b
28 changes: 14 additions & 14 deletions tests/test_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ def test_scheme_extraction(self):
work, coffee, home, coffee2 = extract_schemes(NETWORK_INTERFACES_FILE)

assert work.name == 'work'
assert work.options['wpa-ssid'] == 'workwifi'
assert work.options['wpa-ssid'] == ['workwifi']

assert coffee.name == 'coffee'
assert coffee.options['wireless-essid'] == 'Coffee WiFi'
assert coffee.options['wireless-essid'] == ['Coffee WiFi']

def test_str(self):
scheme = self.Scheme('wlan0', 'test')
assert str(scheme) == 'iface wlan0-test inet dhcp\n'

scheme = self.Scheme('wlan0', 'test', {
scheme = self.Scheme('wlan0', 'test', options={
'wpa-ssid': 'workwifi',
})

Expand All @@ -73,7 +73,7 @@ def test_str(self):
def test_find(self):
work = self.Scheme.find('wlan0', 'work')

assert work.options['wpa-ssid'] == 'workwifi'
assert work.options['wpa-ssid'] == ['workwifi']

def test_delete(self):
work = self.Scheme.find('wlan0', 'work')
Expand Down Expand Up @@ -109,8 +109,8 @@ def test_unencrypted(self):
scheme = Scheme.for_cell('wlan0', 'test', cell)

self.assertEqual(scheme.options, {
'wireless-essid': 'SSID',
'wireless-channel': 'auto',
'wireless-essid': ['SSID'],
'wireless-channel': ['auto'],
})

def test_wep(self):
Expand All @@ -122,8 +122,8 @@ def test_wep(self):
scheme = Scheme.for_cell('wlan0', 'test', cell, 'passkey')

self.assertEqual(scheme.options, {
'wireless-essid': 'SSID',
'wireless-key': 'passkey',
'wireless-essid': ['SSID'],
'wireless-key': ['passkey'],
})

def test_wpa2(self):
Expand All @@ -135,9 +135,9 @@ def test_wpa2(self):
scheme = Scheme.for_cell('wlan0', 'test', cell, b'passkey')

self.assertEqual(scheme.options, {
'wpa-ssid': 'SSID',
'wpa-psk': 'ea1548d4e8850c8d94c5ef9ed6fe483981b64c1436952cb1bf80c08a68cdc763',
'wireless-channel': 'auto',
'wpa-ssid': ['SSID'],
'wpa-psk': ['ea1548d4e8850c8d94c5ef9ed6fe483981b64c1436952cb1bf80c08a68cdc763'],
'wireless-channel': ['auto'],
})

def test_wpa(self):
Expand All @@ -149,9 +149,9 @@ def test_wpa(self):
scheme = Scheme.for_cell('wlan0', 'test', cell, 'passkey')

self.assertEqual(scheme.options, {
'wpa-ssid': 'SSID',
'wpa-psk': 'ea1548d4e8850c8d94c5ef9ed6fe483981b64c1436952cb1bf80c08a68cdc763',
'wireless-channel': 'auto',
'wpa-ssid': ['SSID'],
'wpa-psk': ['ea1548d4e8850c8d94c5ef9ed6fe483981b64c1436952cb1bf80c08a68cdc763'],
'wireless-channel': ['auto'],
})


Expand Down