-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netdog: Update net_config to use test macros
This change updates `net_config` to take advantage of the previously added test macros. It removes the majority of the tests from `mod.rs`, since the test themselves were moved to macros. It updates the location of the test data files, and templates the version. The last and final change is to add the test macros to `v1`.
- Loading branch information
Showing
14 changed files
with
121 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../net_config/invalid_interface_config.toml → ...onfig/basic/invalid_interface_config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 1 | ||
version = {{version}} | ||
|
||
[eno1] | ||
dhcp4 = true | ||
|
2 changes: 1 addition & 1 deletion
2
...est_data/net_config/multiple_primary.toml → ...ta/net_config/basic/multiple_primary.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 1 | ||
version = {{version}} | ||
|
||
[eno1] | ||
dhcp4 = true | ||
|
50 changes: 50 additions & 0 deletions
50
sources/api/netdog/test_data/net_config/basic/net_config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
version = {{version}} | ||
|
||
[eno1] | ||
dhcp4 = true | ||
|
||
[eno2] | ||
dhcp6 = true | ||
primary = true | ||
|
||
[eno3] | ||
dhcp4 = true | ||
dhcp6 = false | ||
|
||
[eno4] | ||
dhcp4 = false | ||
dhcp6 = true | ||
|
||
[eno5] | ||
dhcp4 = true | ||
dhcp6 = true | ||
|
||
[eno6.dhcp4] | ||
enabled = true | ||
route-metric = 100 | ||
|
||
[eno6] | ||
dhcp6 = false | ||
|
||
[eno7] | ||
dhcp4 = true | ||
|
||
[eno7.dhcp6] | ||
enabled = true | ||
optional = true | ||
|
||
[eno8.dhcp4] | ||
enabled = true | ||
optional = true | ||
|
||
[eno8.dhcp6] | ||
enabled = true | ||
optional = true | ||
|
||
[eno9.dhcp4] | ||
enabled = true | ||
optional = true | ||
|
||
[eno10.dhcp6] | ||
enabled = true | ||
optional = true |
1 change: 1 addition & 0 deletions
1
sources/api/netdog/test_data/net_config/basic/no_interfaces.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version = {{version}} |
2 changes: 1 addition & 1 deletion
2
...tdog/test_data/net_config/no_primary.toml → ...est_data/net_config/basic/no_primary.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 1 | ||
version = {{version}} | ||
|
||
[eno3] | ||
dhcp4 = true | ||
|
2 changes: 1 addition & 1 deletion
2
...ata/net_config/dhcp4_missing_enabled.toml → ...et_config/dhcp/dhcp4_missing_enabled.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 1 | ||
version = {{version}} | ||
|
||
[eno1.dhcp4] | ||
optional = true |
2 changes: 1 addition & 1 deletion
2
...ata/net_config/dhcp6_missing_enabled.toml → ...et_config/dhcp/dhcp6_missing_enabled.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 1 | ||
version = {{version}} | ||
|
||
[eno1.dhcp6] | ||
optional = true |
2 changes: 1 addition & 1 deletion
2
...ata/net_config/invalid_dhcp4_options.toml → ...et_config/dhcp/invalid_dhcp4_options.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 1 | ||
version = {{version}} | ||
|
||
[eno1] | ||
dhcp4 = true | ||
|
2 changes: 1 addition & 1 deletion
2
...ata/net_config/invalid_dhcp6_options.toml → ...et_config/dhcp/invalid_dhcp6_options.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version = 1 | ||
version = {{version}} | ||
|
||
[eno1] | ||
dhcp4 = true | ||
|
3 changes: 3 additions & 0 deletions
3
sources/api/netdog/test_data/net_config/dhcp/invalid_dhcp_config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version = {{version}} | ||
|
||
[eno1] |
3 changes: 0 additions & 3 deletions
3
sources/api/netdog/test_data/net_config/invalid_dhcp_config.toml
This file was deleted.
Oops, something went wrong.