Skip to content

Commit

Permalink
Sort fact kwargs in operation tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Oct 15, 2021
1 parent a948ace commit e22b89d
Show file tree
Hide file tree
Showing 44 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion pyinfra/api/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_kwargs_str(kwargs):

items = [
'{0}={1}'.format(key, value)
for key, value in kwargs.items()
for key, value in sorted(kwargs.items())
if key not in ('self', 'state', 'host')
]
return ', '.join(items)
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.database/add.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"mysql.MysqlDatabases": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.database/add_noop.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"args": ["somedb"],
"facts": {
"mysql.MysqlDatabases": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"somedb": {}
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/operations/mysql.database/add_privileges.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
},
"facts": {
"mysql.MysqlDatabases": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
},
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"localhost": {}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.database/delete.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlDatabases": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"somedb": {}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.database/delete_noop.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlDatabases": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [],
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.privileges/add.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"args": ["someuser", ["SELECT", "INSERT", "DELETE"]],
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": ["DELETE"]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.privileges/add_database.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": []
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.privileges/add_existing.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"args": ["someuser", ["SELECT", "INSERT"]],
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": ["SELECT", "INSERT"]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.privileges/add_table.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": []
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.privileges/add_table_invalid.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": []
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": []
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.privileges/delete.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": ["SELECT", "INSERT"]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": ["SELECT", "GRANT OPTION"]
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.privileges/remove_noop.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localhost, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localhost": {
"*.*": {
"privileges": []
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/add.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/add_noop.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"args": ["someuser"],
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localhost": {}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/add_password.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [
Expand Down
4 changes: 2 additions & 2 deletions tests/operations/mysql.user/add_privileges.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
},
"mysql.MysqlUserGrants": {
"user=someuser, user_hostname=localwhat, mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None, user=someuser, user_hostname=localwhat": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/add_resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/add_ssl.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/add_x509.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/add_x509_specified.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/delete.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localwhat": {}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/remove_noop.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {}
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {}
}
},
"commands": [],
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/update_resources.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localhost": {
"max_user_connections": 0,
"max_questions": 0,
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/update_resources_partial.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localhost": {
"max_user_connections": 500,
"max_questions": 0,
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/update_ssl.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localhost": {
"ssl_type": null
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/update_x509.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localhost": {
"ssl_type": null
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/mysql.user/update_x509_specified.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localhost": {
"ssl_cipher": null,
"x509_issuer": null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"facts": {
"mysql.MysqlUsers": {
"mysql_user=None, mysql_password=None, mysql_host=None, mysql_port=None": {
"mysql_host=None, mysql_password=None, mysql_port=None, mysql_user=None": {
"someuser@localhost": {
"ssl_cipher": "a-cipher",
"x509_issuer": null,
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.database/add_database.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"args": ["somedb"],
"facts" :{
"postgresql.PostgresqlDatabases": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"args": ["somedb"],
"facts" :{
"postgresql.PostgresqlDatabases": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {
"somedb": {}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts" :{
"postgresql.PostgresqlDatabases": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.database/remove_database.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts" :{
"postgresql.PostgresqlDatabases": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {
"somedb": {}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts" :{
"postgresql.PostgresqlDatabases": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [],
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.role/role_add_noop.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"args": ["testuser"],
"facts": {
"postgresql.PostgresqlRoles": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {
"testuser": {}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.role/role_remove_noop.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"postgresql.PostgresqlRoles": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [],
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.role/user_add.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"postgresql.PostgresqlRoles": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.role/user_add_no_login.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"postgresql.PostgresqlRoles": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.role/user_add_privileges.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"facts": {
"postgresql.PostgresqlRoles": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.role/user_add_replication.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"facts": {
"postgresql.PostgresqlRoles": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [
Expand Down
2 changes: 1 addition & 1 deletion tests/operations/postgresql.role/user_add_super.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"facts": {
"postgresql.PostgresqlRoles": {
"postgresql_user=None, postgresql_password=None, postgresql_host=None, postgresql_port=None": {}
"postgresql_host=None, postgresql_password=None, postgresql_port=None, postgresql_user=None": {}
}
},
"commands": [
Expand Down
Loading

0 comments on commit e22b89d

Please sign in to comment.