crc icon indicating copy to clipboard operation
crc copied to clipboard

Unit Tests fail on macOS m1 on main branch and v2.4.1

Open tricktron opened this issue 3 years ago • 1 comments

General information

  • OS: macOS m1
  • Running CRC on: Laptop

CRC version

CRC version: 2.5.0+2b25181
OpenShift version: 4.10.18
Podman version: 4.0.2

Host Operating System

ProductName:    macOS m1
ProductVersion: 12.4
BuildVersion:   21F79

Steps to reproduce

  1. make test

Expected

All tests pass.

Actual

  • TestConfigGet fails:
    api_client_test.go:125: 
        	Error Trace:	api_client_test.go:125
        	Error:      	Not equal: 
        	            	expected: client.GetConfigResult{Configs:map[string]interface {}{"cpus":4}}
        	            	actual  : client.GetConfigResult{Configs:map[string]interface {}{"cpus":2}}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -2,3 +2,3 @@
        	            	  Configs: (map[string]interface {}) (len=1) {
        	            	-  (string) (len=4) "cpus": (float64) 4
        	            	+  (string) (len=4) "cpus": (float64) 2
        	            	  }
        	Test:       	TestConfigGet
--- FAIL: TestConfigGet (0.00s)
  • TestConfigGetMultiple fails (probably related to TestConfigGet)
  • TestPullSecret fails:
    api_client_test.go:273: 
        	Error Trace:	api_client_test.go:273
        	Error:      	Should be false
        	Test:       	TestPullSecret
--- FAIL: TestPullSecret (0.00s
  • TestRequests fails:
{"Configs":{"cpus":2}}
    api_http_test.go:468: 
        	Error Trace:	api_http_test.go:468
        	            				api_http_test.go:478
        	Error:      	Not equal: 
        	            	expected: "{\"Configs\":{\"cpus\":4}}"
        	            	actual  : "{\"Configs\":{\"cpus\":2}}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-{"Configs":{"cpus":4}}
        	            	+{"Configs":{"cpus":2}}
        	Test:       	TestRequests
        	Messages:   	GET /config?cpus HTTP/1.1
--- FAIL: TestRequests (0.00s)
  • TestLoadPullSecret fails:
pullsecret_test.go:37: 
        	Error Trace:	pullsecret_test.go:37
        	Error:      	An error is expected but got nil.
        	Test:       	TestLoadPullSecret
    pullsecret_test.go:43: 
        	Error Trace:	pullsecret_test.go:43
        	Error:      	Not equal: 
        	            	expected: "{\"auths\":{\"quay.io\":{\"auth\":\"secret3\"}}}"
        	            	actual  : "{\"auths\":{\"fake\":{\"auth\": \"Zm9vOmJhcgo=\"}}}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-{"auths":{"quay.io":{"auth":"secret3"}}}
        	            	+{"auths":{"fake":{"auth": "Zm9vOmJhcgo="}}}
        	Test:       	TestLoadPullSecret
    pullsecret_test.go:51: 
        	Error Trace:	pullsecret_test.go:51
        	Error:      	Not equal: 
        	            	expected: "{\"auths\":{\"quay.io\":{\"auth\":\"secret2\"}}}"
        	            	actual  : "{\"auths\":{\"fake\":{\"auth\": \"Zm9vOmJhcgo=\"}}}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-{"auths":{"quay.io":{"auth":"secret2"}}}
        	            	+{"auths":{"fake":{"auth": "Zm9vOmJhcgo="}}}
        	Test:       	TestLoadPullSecret
    pullsecret_test.go:57: 
        	Error Trace:	pullsecret_test.go:57
        	Error:      	Not equal: 
        	            	expected: "{\"auths\":{\"quay.io\":{\"auth\":\"secret1\"}}}"
        	            	actual  : "{\"auths\":{\"fake\":{\"auth\": \"Zm9vOmJhcgo=\"}}}"
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -1 +1 @@
        	            	-{"auths":{"quay.io":{"auth":"secret1"}}}
        	            	+{"auths":{"fake":{"auth": "Zm9vOmJhcgo="}}}
        	Test:       	TestLoadPullSecret
--- FAIL: TestLoadPullSecret (0.00s)

Full Logs

crc-aarch64-darwin-2.5.0+2b25181.log

tricktron avatar Jun 24 '22 14:06 tricktron

Thanks for the report! This is a side-effect of b14fb9dd247e8860daa848e5966ca0aff1af46ec (the tests assume the openshift preset is in use), and was not detected because we don't have any automated m1 tests.

cfergeau avatar Jun 24 '22 15:06 cfergeau

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 20 '22 21:09 stale[bot]

All tests pass on current main branch with commit c5926eb68da0e8c7e0c1b6aff7efd5b6c42069b0.

tricktron avatar Sep 22 '22 09:09 tricktron