@@ -53,15 +53,15 @@ def test_editions(client: TestClient, mocker: Mock) -> None:
53
53
assert e0 ["pending_rebuild" ] is False
54
54
55
55
# ========================================================================
56
- # Create a build of the 'master ' branch
56
+ # Create a build of the 'main ' branch
57
57
mocker .resetall ()
58
58
59
- r = client .post ("/products/pipelines/builds/" , {"git_refs" : ["master " ]})
59
+ r = client .post ("/products/pipelines/builds/" , {"git_refs" : ["main " ]})
60
60
b1_url = r .json ["self_url" ]
61
61
assert r .status == 201
62
62
63
63
# ========================================================================
64
- # Confirm build of the 'master ' branch
64
+ # Confirm build of the 'main ' branch
65
65
mocker .resetall ()
66
66
67
67
client .patch (b1_url , {"uploaded" : True })
@@ -81,15 +81,15 @@ def test_editions(client: TestClient, mocker: Mock) -> None:
81
81
r = client .patch (e0_url , {"pending_rebuild" : False })
82
82
83
83
# ========================================================================
84
- # Create a second build of the 'master ' branch
84
+ # Create a second build of the 'main ' branch
85
85
mocker .resetall ()
86
86
87
- r = client .post ("/products/pipelines/builds/" , {"git_refs" : ["master " ]})
87
+ r = client .post ("/products/pipelines/builds/" , {"git_refs" : ["main " ]})
88
88
assert r .status == 201
89
89
b2_url = r .json ["self_url" ]
90
90
91
91
# ========================================================================
92
- # Confirm second build of the 'master ' branch
92
+ # Confirm second build of the 'main ' branch
93
93
mocker .resetall ()
94
94
95
95
client .patch (b2_url , {"uploaded" : True })
@@ -109,11 +109,11 @@ def test_editions(client: TestClient, mocker: Mock) -> None:
109
109
r = client .patch (e0_url , {"pending_rebuild" : False })
110
110
111
111
# ========================================================================
112
- # Setup an edition also tracking master called 'latest'
112
+ # Setup an edition also tracking main called 'latest'
113
113
mocker .resetall ()
114
114
115
115
e1 = {
116
- "tracked_refs" : ["master " ],
116
+ "tracked_refs" : ["main " ],
117
117
"slug" : "latest" ,
118
118
"title" : "Latest" ,
119
119
"build_url" : b1_url ,
@@ -181,11 +181,11 @@ def test_editions(client: TestClient, mocker: Mock) -> None:
181
181
# Change the tracked_refs with PATCH
182
182
mocker .resetall ()
183
183
184
- r = client .patch (e1_url , {"tracked_refs" : ["tickets/DM-9999" , "master " ]})
184
+ r = client .patch (e1_url , {"tracked_refs" : ["tickets/DM-9999" , "main " ]})
185
185
186
186
assert r .status == 200
187
187
assert r .json ["tracked_refs" ][0 ] == "tickets/DM-9999"
188
- assert r .json ["tracked_refs" ][1 ] == "master "
188
+ assert r .json ["tracked_refs" ][1 ] == "main "
189
189
assert r .json ["pending_rebuild" ] is False # no need to rebuild
190
190
191
191
mock_registry [
@@ -217,7 +217,7 @@ def test_editions(client: TestClient, mocker: Mock) -> None:
217
217
with pytest .raises (ValidationError ):
218
218
r = client .post (
219
219
"/products/pipelines/editions/" ,
220
- {"slug" : "main" , "tracked_refs" : ["master " ], "title" : "Main" },
220
+ {"slug" : "main" , "tracked_refs" : ["main " ], "title" : "Main" },
221
221
)
222
222
223
223
0 commit comments