Skip to content

Commit 568afb1

Browse files
committed
whitespace cleanup
1 parent 132c134 commit 568afb1

3 files changed

Lines changed: 37 additions & 37 deletions

File tree

promise-types/dnf_appstream/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ bundle agent setup_web_server
180180
# These packages will be installed from the enabled AppStream modules
181181
"nodejs" package_method => dnf;
182182
"postgresql-server" package_method => dnf;
183-
183+
184184
# Standard packages
185185
"nginx" package_method => dnf;
186186
}
187-
```
187+
```

promise-types/dnf_appstream/example.cf

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ bundle agent main
4747
# Install packages that are part of AppStream modules
4848
packages:
4949
# Node.js packages from the enabled stream
50-
"nodejs"
50+
"nodejs"
5151
package_method => dnf_with_modules;
52-
52+
5353
# Python 3.6 packages from the installed stream
54-
"python36"
54+
"python36"
5555
package_method => dnf_with_modules;
56-
56+
5757
# PostgreSQL packages from the enabled stream
58-
"postgresql-server"
58+
"postgresql-server"
5959
package_method => dnf_with_modules;
60-
60+
6161
# Other packages from standard repositories
62-
"nginx"
62+
"nginx"
6363
package_method => dnf_with_modules;
64-
"git"
64+
"git"
6565
package_method => dnf_with_modules;
6666
}
6767

@@ -84,20 +84,20 @@ bundle agent setup_development_environment
8484

8585
packages:
8686
# Install packages from the enabled modules
87-
"nodejs"
87+
"nodejs"
8888
package_method => dnf_with_modules;
89-
90-
"python36"
89+
90+
"python36"
9191
package_method => dnf_with_modules;
92-
93-
"maven"
92+
93+
"maven"
9494
package_method => dnf_with_modules;
95-
95+
9696
# Additional development tools
97-
"gcc"
97+
"gcc"
9898
package_method => dnf_with_modules;
99-
"make"
99+
"make"
100100
package_method => dnf_with_modules;
101-
"vim-enhanced"
101+
"vim-enhanced"
102102
package_method => dnf_with_modules;
103-
}
103+
}

promise-types/dnf_appstream/test_dnf_appstream.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
def test_validation():
1818
"""Test validation of module attributes"""
1919
print("Testing validation...")
20-
20+
2121
module = DnfAppStreamPromiseTypeModule()
22-
22+
2323
# Test valid attributes
2424
try:
2525
module.validate_promise("nodejs", {
@@ -29,7 +29,7 @@ def test_validation():
2929
print(" ✓ Valid attributes validation passed")
3030
except Exception as e:
3131
print(f" ✗ Valid attributes validation failed: {e}")
32-
32+
3333
# Test invalid module name
3434
try:
3535
module.validate_promise("nodejs; rm -rf /", {
@@ -40,17 +40,17 @@ def test_validation():
4040
print(f" ✓ Invalid module name validation passed: {e}")
4141
except Exception as e:
4242
print(f" ? Unexpected exception for invalid module name: {e}")
43-
43+
4444
# Note: Stream and State validation have been moved to attribute validators
4545
# which are handled by the library, not inside validate_promise directly.
4646
# Therefore we don't test them here via validate_promise, but in their specific test functions below.
4747

4848
def test_module_name_validation():
4949
"""Test module name validation"""
5050
print("\nTesting module name validation...")
51-
51+
5252
module = DnfAppStreamPromiseTypeModule()
53-
53+
5454
# Test valid names
5555
valid_names = ["nodejs", "python3.6", "python36", "postgresql", "maven", "httpd"]
5656
for name in valid_names:
@@ -59,7 +59,7 @@ def test_module_name_validation():
5959
print(f" ✓ Valid name '{name}' passed validation")
6060
except Exception as e:
6161
print(f" ✗ Valid name '{name}' failed validation: {e}")
62-
62+
6363
# Test invalid names
6464
invalid_names = ["nodejs;rm", "python36&&", "postgresql|", "maven>", "httpd<"]
6565
for name in invalid_names:
@@ -72,9 +72,9 @@ def test_module_name_validation():
7272
def test_stream_name_validation():
7373
"""Test stream name validation"""
7474
print("\nTesting stream name validation...")
75-
75+
7676
module = DnfAppStreamPromiseTypeModule()
77-
77+
7878
# Test valid stream names
7979
valid_streams = ["12", "14", "3.6", "1.14", "latest", "stable"]
8080
for stream in valid_streams:
@@ -83,7 +83,7 @@ def test_stream_name_validation():
8383
print(f" ✓ Valid stream '{stream}' passed validation")
8484
except Exception as e:
8585
print(f" ✗ Valid stream '{stream}' failed validation: {e}")
86-
86+
8787
# Test invalid stream names
8888
invalid_streams = ["12;rm", "14&&", "3.6|", "latest>", "stable<"]
8989
for stream in invalid_streams:
@@ -96,9 +96,9 @@ def test_stream_name_validation():
9696
def test_state_validation():
9797
"""Test state validation"""
9898
print("\nTesting state validation...")
99-
99+
100100
module = DnfAppStreamPromiseTypeModule()
101-
101+
102102
# Test valid states
103103
valid_states = ["enabled", "disabled", "installed", "removed"]
104104
for state in valid_states:
@@ -107,7 +107,7 @@ def test_state_validation():
107107
print(f" ✓ Valid state '{state}' passed validation")
108108
except Exception as e:
109109
print(f" ✗ Valid state '{state}' failed validation: {e}")
110-
110+
111111
# Test invalid states
112112
invalid_states = ["active", "inactive", "present", "absent", "enable", "disable"]
113113
for state in invalid_states:
@@ -122,9 +122,9 @@ def test_state_validation():
122122
def test_state_parsing():
123123
"""Test parsing of module states from dnf output"""
124124
print("\nTesting state parsing...")
125-
125+
126126
module = DnfAppStreamPromiseTypeModule()
127-
127+
128128
# Test that the method exists and can be called
129129
try:
130130
# We can't easily test the actual parsing without mocking dnf,
@@ -136,11 +136,11 @@ def test_state_parsing():
136136

137137
if __name__ == "__main__":
138138
print("Running tests for dnf_appstream promise type...")
139-
139+
140140
test_validation()
141141
test_module_name_validation()
142142
test_stream_name_validation()
143143
test_state_validation()
144144
test_state_parsing()
145-
145+
146146
print("\nAll tests completed.")

0 commit comments

Comments
 (0)