Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Fix Sobek Object.Get(key) returns *[]any instead of []any #1515

Merged
merged 1 commit into from
Nov 7, 2024

Conversation

inancgumus
Copy link
Member

@inancgumus inancgumus commented Nov 6, 2024

What?

Fixes Sobek Object.Get(key) returns *[]any instead of []any issue.

Why?

This was causing the test to fail with the latest k6 (~v0.55) after an update was made to Sobek or its dependencies.

--- FAIL: TestBrowserContextOptionsPermissions (0.00s)
    browser_context_options_test.go:21: 
        	Error Trace:	/home/runner/work/xk6-browser/xk6-browser/browser/browser_context_options_test.go:21
        	Error:      	"[]" should have 2 item(s), but has 0
        	Test:       	TestBrowserContextOptionsPermissions
    browser_context_options_test.go:22: 
        	Error Trace:	/home/runner/work/xk6-browser/xk6-browser/browser/browser_context_options_test.go:22
        	Error:      	Not equal: 
        	            	expected: []string{}
        	            	actual  : []string{"camera", "microphone"}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1,2 +1,4 @@
        	            	-([]string) {
        	            	+([]string) (len=2) {
        	            	+ (string) (len=6) "camera",
        	            	+ (string) (len=10) "microphone"
        	            	 }
        	Test:       	TestBrowserContextOptionsPermissions
FAIL

Checklist

  • I have performed a self-review of my code
  • I have added tests for my changes
  • I have commented on my code, particularly in hard-to-understand areas

Related PR(s)/Issue(s)

Updates #1516

@inancgumus inancgumus added bug Something isn't working ci compatibility k6 core compatibility labels Nov 6, 2024
@inancgumus inancgumus self-assigned this Nov 6, 2024
@inancgumus inancgumus marked this pull request as ready for review November 6, 2024 18:45
@inancgumus inancgumus requested a review from ankur22 November 6, 2024 18:45
Copy link
Collaborator

@ankur22 ankur22 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

This was causing the CI tests to fail after an update made to Sobek.
@inancgumus inancgumus force-pushed the fix/sobek-ptr-any-slice-parsing branch from 104780f to 19b6407 Compare November 7, 2024 14:42
@inancgumus inancgumus requested a review from a team as a code owner November 7, 2024 14:42
@inancgumus inancgumus requested review from olegbespalov and joanlopez and removed request for a team November 7, 2024 14:42
@inancgumus inancgumus merged commit 740dac8 into main Nov 7, 2024
19 of 20 checks passed
@inancgumus inancgumus deleted the fix/sobek-ptr-any-slice-parsing branch November 7, 2024 14:42
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working ci compatibility k6 core compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants