Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #34044 - stop caring about array order in test_sync_container_gateway #10889

Conversation

jeremylenz
Copy link
Member

@jeremylenz jeremylenz commented Feb 13, 2024

What are the changes introduced in this pull request?

I'm hoping this will fix an intermittent test failure in Katello CI:

[2024-02-13T21:28:49.603Z] Failure:

[2024-02-13T21:28:49.603Z] Katello::SmartProxyExtensionsTest#test_sync_container_gateway [/home/jenkins/workspace/foreman-pr-katello-test/app/models/katello/concerns/smart_proxy_extensions.rb:199]

[2024-02-13T21:28:49.603Z] Minitest::Assertion: unexpected invocation: #<AnyInstance:ProxyAPI::ContainerGateway>.repository_list({:repositories => [{:repository => "busybox", :auth_required => true}, {:repository => "empty_organization-puppet_product-busybox", :auth_required => true}]})

[2024-02-13T21:28:49.603Z] unsatisfied expectations:

[2024-02-13T21:28:49.603Z] - expected exactly once, invoked never: #<AnyInstance:ProxyAPI::ContainerGateway>.user_repository_mapping()

[2024-02-13T21:28:49.603Z] - expected exactly once, invoked never: #<AnyInstance:ProxyAPI::ContainerGateway>.repository_list({:repositories => [{:repository => "empty_organization-puppet_product-busybox", :auth_required => true}, {:repository => "busybox", :auth_required => true}]})

[2024-02-13T21:28:49.603Z] - expected exactly once, invoked never: #<SmartProxy:0x88f1d0>.container_gateway_users(any_parameters)

Example failure: https://ci.theforeman.org/blue/organizations/jenkins/foreman-pr-katello-test/detail/foreman-pr-katello-test/2326/pipeline/

Considerations taken when implementing this change?

I can't reproduce the failure locally; it's very intermittent and seems to only happen on CI

What are the testing steps for this pull request?

I guess just run the tests a bunch of times

@jeremylenz
Copy link
Member Author

[test katello]

1 similar comment
@sjha4
Copy link
Member

sjha4 commented Feb 14, 2024

[test katello]

:repositories => [{:repository => "empty_organization-puppet_product-busybox", :auth_required => true}, {:repository => "busybox", :auth_required => true}]
}
repo_list_update_expectation = ProxyAPI::ContainerGateway.any_instance.expects(:repository_list).with do |value|
Set.new(value[:repositories]) == Set.new(expected_repo_list_args[:repositories])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 😸

Copy link
Member

@sjha4 sjha4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's passing..Code makes sense..Ack.. 👍🏼

@jeremylenz jeremylenz merged commit 1b9a08b into Katello:master Feb 14, 2024
12 of 15 checks passed
ianballou pushed a commit to ianballou/katello that referenced this pull request Feb 20, 2024
ianballou pushed a commit that referenced this pull request Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants