Skip to content

Commit

Permalink
Adapt mintests to not check for directory count
Browse files Browse the repository at this point in the history
After changing the `source/:project_name` to always pass the
request to the backend, the `count` attribute is not longer
part of the `directory` tag. This was only included by the frontend.
  • Loading branch information
krauselukas committed Oct 23, 2024
1 parent 4dde082 commit 63e715a
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/api/test/functional/channel_maintenance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def test_large_channel_test
assert_xml_tag tag: 'entry', attributes: { name: 'pack2.BaseDistro2.0_LinkedUpdateProject' }
assert_xml_tag tag: 'entry', attributes: { name: 'pack2.linked.BaseDistro2.0_LinkedUpdateProject' }
assert_xml_tag tag: 'entry', attributes: { name: 'patchinfo' }
assert_xml_tag tag: 'directory', attributes: { count: '4' }
assert_xml_tag tag: 'directory'
# cleanup
delete "/source/#{maintenance_yet_another_project}"
assert_response :success
Expand Down Expand Up @@ -899,7 +899,7 @@ def test_large_channel_test
assert_xml_tag(tag: 'entry', attributes: { name: 'BaseDistro2.Channel' })
assert_xml_tag(tag: 'entry', attributes: { name: 'BaseDistro2SDK.Channel' })
assert_xml_tag(tag: 'entry', attributes: { name: 'patchinfo' })
assert_xml_tag(tag: 'directory', attributes: { count: '5' }) # and nothing else
assert_xml_tag(tag: 'directory') # and nothing else

# validate cleanup
get '/source/home:tom:branches:OBS_Maintained:pack2/pack2.BaseDistro2.0_LinkedUpdateProject'
Expand Down Expand Up @@ -928,7 +928,7 @@ def test_large_channel_test
get '/source/TEST'
assert_response :success
# ensure that we did not got the incident number extension, but the local linked package
assert_xml_tag(tag: 'directory', attributes: { count: '2' })
assert_xml_tag(tag: 'directory')
assert_xml_tag(tag: 'entry', attributes: { name: 'pack2' })
assert_xml_tag(tag: 'entry', attributes: { name: 'pack2.linked' })
delete '/source/TEST'
Expand Down
4 changes: 2 additions & 2 deletions src/api/test/functional/interconnect_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -299,13 +299,13 @@ def test_read_and_command_tests
assert_response :success
get "/source/#{project}"
assert_response :success
assert_xml_tag(tag: 'directory', attributes: { count: '0' })
assert_xml_tag(tag: 'directory')
get "/source/#{project}?expand=1"
assert_response :success
next unless @ENABLE_BROKEN_TEST

# FIXME2.4: remote packages get not added yet.
assert_xml_tag(tag: 'directory', attributes: { count: '1' })
assert_xml_tag(tag: 'directory')
assert_xml_tag(tag: 'entry', attributes: { name: 'pack1', originproject: 'BaseDistro2.0' })
end

Expand Down
2 changes: 1 addition & 1 deletion src/api/test/functional/kgraft_maintenance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def test_kgraft_update_setup
# validate sources
get '/source/' + incident_project
assert_response :success
assert_xml_tag tag: 'directory', attributes: { count: 4 }
assert_xml_tag tag: 'directory'
assert_xml_tag tag: 'entry', attributes: { name: 'BaseDistro2.Channel' }
assert_xml_tag tag: 'entry', attributes: { name: 'kgraft-GA.BaseDistro2.0' }
assert_xml_tag tag: 'entry', attributes: { name: 'kgraft-incident-0.My_Maintenance_0' }
Expand Down
6 changes: 3 additions & 3 deletions src/api/test/functional/maintenance_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def test_mbranch_and_maintenance_entire_project_request

get "/source/#{incident_project}"
assert_response :success
assert_xml_tag(tag: 'directory', attributes: { count: '3' })
assert_xml_tag(tag: 'directory')

get "/source/#{incident_project}/pack2.BaseDistro_Update/_meta"
assert_response :success
Expand Down Expand Up @@ -962,7 +962,7 @@ def test_create_maintenance_project_and_release_packages
assert_xml_tag(tag: 'link', attributes: { project: 'BaseDistro2.0:LinkedUpdateProject', package: 'pack2' })
get "/source/#{incident_project}"
assert_response :success
assert_xml_tag(tag: 'directory', attributes: { count: '3' })
assert_xml_tag(tag: 'directory')
assert_xml_tag(tag: 'entry', attributes: { name: 'pack2.BaseDistro2.0_LinkedUpdateProject' })
assert_xml_tag(tag: 'entry', attributes: { name: 'pack2.linked.BaseDistro2.0_LinkedUpdateProject' })
assert_xml_tag(tag: 'entry', attributes: { name: 'pack2.BaseDistro3' })
Expand Down Expand Up @@ -2307,7 +2307,7 @@ def test_copy_project_for_release
assert_response :success
get '/source/CopyOfBaseDistro'
assert_response :success
assert_xml_tag(tag: 'directory', attributes: { count: '6' })
assert_xml_tag(tag: 'directory')
assert_xml_tag(tag: 'entry', attributes: { name: '_product' })
assert_xml_tag(tag: 'entry', attributes: { name: '_product:fixed-release' })
assert_xml_tag(tag: 'entry', attributes: { name: 'patchinfo' })
Expand Down
4 changes: 2 additions & 2 deletions src/api/test/functional/product_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,13 +312,13 @@ def test_sle11_product_file
login_tom
get '/source/home:tom:temporary:link'
assert_response :success
assert_xml_tag tag: 'directory', attributes: { count: '0' }
assert_xml_tag tag: 'directory'
post '/source/home:tom:temporary/_product:sle-obs-cd-cd-i586_x86_64?cmd=release'
assert_response :success
get '/source/home:tom:temporary:link'
assert_response :success
assert_xml_tag tag: 'entry', attributes: { name: '_product:sle-obs-cd-cd-i586_x86_64' },
parent: { tag: 'directory', attributes: { count: '1' } }
parent: { tag: 'directory' }
# FIXME: add tests for release number handling with various products, requires product binaries and trees

# remove product and check that _product: get removed as well.
Expand Down
4 changes: 2 additions & 2 deletions src/api/test/functional/source_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2330,10 +2330,10 @@ def test_linked_project_operations
# listings
get '/source/BaseDistro2.0:LinkedUpdateProject'
assert_response :success
assert_xml_tag(tag: 'directory', attributes: { count: '1' })
assert_xml_tag(tag: 'directory')
get '/source/BaseDistro2.0:LinkedUpdateProject?expand=1'
assert_response :success
assert_xml_tag(tag: 'directory', attributes: { count: '3' })
assert_xml_tag(tag: 'directory')
assert_xml_tag(tag: 'entry', attributes: { name: 'pack2', originproject: 'BaseDistro2.0' })
assert_xml_tag(tag: 'entry', attributes: { name: 'pack2.linked', originproject: 'BaseDistro2.0' })

Expand Down

0 comments on commit 63e715a

Please sign in to comment.