@@ -113,7 +113,6 @@ func TestTaskIDV2(t *testing.T) {
113
113
digest string
114
114
tag string
115
115
application string
116
- pieceLength int32
117
116
filters []string
118
117
expect func (t * testing.T , d any )
119
118
}{
@@ -123,11 +122,10 @@ func TestTaskIDV2(t *testing.T) {
123
122
digest : "sha256:c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" ,
124
123
tag : "foo" ,
125
124
application : "bar" ,
126
- pieceLength : 1 ,
127
125
filters : []string {},
128
126
expect : func (t * testing.T , d any ) {
129
127
assert := assert .New (t )
130
- assert .Equal (d , "6acf73532a2e7b8c30dfc7abce2fd7d2a2cd3746f16b0d54d3e2f136ffa61c90 " )
128
+ assert .Equal (d , "c8659b8372599cf22c7a2de260dd6e148fca6d4e1c2940703022867f739d071d " )
131
129
},
132
130
},
133
131
{
@@ -136,7 +134,7 @@ func TestTaskIDV2(t *testing.T) {
136
134
digest : "sha256:c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4" ,
137
135
expect : func (t * testing.T , d any ) {
138
136
assert := assert .New (t )
139
- assert .Equal (d , "b08a435da662ad5ae8ab8359a9c4ebd5027cf14d04b71ccc85f1e197e898adbd " )
137
+ assert .Equal (d , "60469c583429af631a45540f05e08805b31ca4f84e7974cad35cfc84c197bcf8 " )
140
138
},
141
139
},
142
140
{
@@ -145,7 +143,7 @@ func TestTaskIDV2(t *testing.T) {
145
143
tag : "foo" ,
146
144
expect : func (t * testing.T , d any ) {
147
145
assert := assert .New (t )
148
- assert .Equal (d , "274c3716c538b5a49e7296ee36dd412bae29948dfb6153e5ac9694e382144f83 " )
146
+ assert .Equal (d , "2773851c628744fb7933003195db436ce397c1722920696c4274ff804d86920b " )
149
147
},
150
148
},
151
149
{
@@ -154,16 +152,7 @@ func TestTaskIDV2(t *testing.T) {
154
152
application : "bar" ,
155
153
expect : func (t * testing.T , d any ) {
156
154
assert := assert .New (t )
157
- assert .Equal (d , "ca12c6591c38f726c238f35d9c7945559b52a0dcc10ae191920be6f5f8a0326a" )
158
- },
159
- },
160
- {
161
- name : "generate taskID with pieceLength" ,
162
- url : "https://example.com" ,
163
- pieceLength : 1 ,
164
- expect : func (t * testing.T , d any ) {
165
- assert := assert .New (t )
166
- assert .Equal (d , "614fb0088e7d82b2538f1ccb5861db5940aaa665b587792898e4be1f591bafec" )
155
+ assert .Equal (d , "63dee2822037636b0109876b58e95692233840753a882afa69b9b5ee82a6c57d" )
167
156
},
168
157
},
169
158
{
@@ -172,14 +161,14 @@ func TestTaskIDV2(t *testing.T) {
172
161
filters : []string {"foo" , "bar" },
173
162
expect : func (t * testing.T , d any ) {
174
163
assert := assert .New (t )
175
- assert .Equal (d , "4a89bbe790108d4987e7dc5127df2b99aea1c17828f1ff3e55176f49ac974b28 " )
164
+ assert .Equal (d , "100680ad546ce6a577f42f52df33b4cfdca756859e664b8d7de329b150d09ce9 " )
176
165
},
177
166
},
178
167
}
179
168
180
169
for _ , tc := range tests {
181
170
t .Run (tc .name , func (t * testing.T ) {
182
- tc .expect (t , TaskIDV2 (tc .url , tc .digest , tc .tag , tc .application , tc .pieceLength , tc . filters ))
171
+ tc .expect (t , TaskIDV2 (tc .url , tc .digest , tc .tag , tc .application , tc .filters ))
183
172
})
184
173
}
185
174
}
0 commit comments