-
Notifications
You must be signed in to change notification settings - Fork 7
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
Filter away timestamps from diffs, increase testing. #199
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,8 @@ network list_used_addresses 2001:db8::/64 | |
network list_unused_addresses 2001:db8::/64 | ||
network set_reserved 2001:db8::/64 50 | ||
host add tinyhost -ip 2001:db8::/64 -contact [email protected] | ||
host info tinyhost | 2001 | ||
host info tinyhost |! example.org | ||
host remove tinyhost | ||
network remove 2001:db8::/64 -f | ||
|
||
|
@@ -56,6 +58,7 @@ network set_description 10.0.1.0/24 "Frozen but has one host" | |
network set_vlan 10.0.1.0/24 1234 | ||
network info 10.0.1.0/24 | ||
network find -network 10.0.1.0/24 -description '*one host*' -vlan 1234 -frozen 1 -reserved 6 -dns_delegated 0 -category Yellow -location Somewhere | ||
host history somehost | ||
host remove somehost | ||
network unset_frozen 10.0.1.0/24 | ||
host add otherhost -ip 10.0.1.20 -contact [email protected] # fails because reserved range | ||
|
@@ -95,6 +98,7 @@ group info mygroup | |
group group_remove mygroup yourgroup | ||
group owner_add mygroup anotherowner | ||
group owner_remove mygroup myself | ||
group history mygroup | ||
group delete mygroup # fails because the group contains testhost1, must force | ||
group delete mygroup -force | ||
group delete yourgroup | ||
|
@@ -130,9 +134,10 @@ policy list_roles * | |
policy list_roles fru | ||
policy add_atom fruit apple | ||
policy add_atom fruit orange | ||
policy info orange |! Created # Created dates will differ | ||
policy info fruit |! Created # Created dates will differ | ||
policy list_members fruit |! Created # Created dates will differ | ||
policy info orange | ||
policy info fruit | ||
policy list_members fruit | ||
policy atom_history apple | ||
policy atom_delete apple # Should fail because 'apple' is used in role 'fruit' | ||
policy remove_atom fruit apple | ||
policy atom_delete apple | ||
|
@@ -147,6 +152,7 @@ policy host_remove fruit foo | |
policy remove_atom fruit banana # should fail | ||
policy remove_atom fruit tangerine | ||
policy role_delete vegetables # fails, that role doesn't exist | ||
policy role_history fruit | ||
policy role_delete fruit | ||
policy atom_delete tangerine | ||
host remove foo | ||
|
@@ -285,7 +291,7 @@ label add postit 'A label again' | |
policy role_create myrole 'This is the description' | ||
policy label_add postit myrole | ||
policy list_roles * | ||
policy info myrole |! Created # Created dates will differ | ||
policy info myrole | ||
label info postit | ||
policy label_remove postit myrole | ||
policy role_delete myrole | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only consider implementing this if you think
replace_timestamps()
could actually be called with typed values in the future (currently onlyAny
is passed to it).This is not perfect, but provides some very rudimentary type checking:
With a more complicated
TypeVar
we could get rid of theAny
from the returnedlist
anddict
type annotations, but that's overkill for something that isn't even part of the CLI itself.