Skip to content

Correct param access in InitServer to pass test, rather than calling SetServerDefaults twice #3045

@h2zh

Description

@h2zh

A duplicate SetServerDefaults call was introduced in #2869 (see this comment) as a workaround for the "port 0" issue in TestWriteOriginScitokensConfig.

    	            	Diff:
    	            	--- Expected
    	            	+++ Actual
    	            	@@ -22,3 +22,3 @@
    	            	 [Global]
    	            	-audience_json = ["test_audience","https://origin.example.com:8443"]
    	            	+audience_json = ["test_audience","https://origin.example.com:0"]
    	            	 
    	Test:       	TestWriteOriginScitokensConfig
FAIL

However, we should solve the root problem directly: SetServerDefaults used param.Origin_Port.GetInt() and param.Cache_Port.GetInt(), which read from the atomic config before it refreshes, resulting in incorrect port values (0 instead of 8443) and breaking the test.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcacheIssue relating to the cache componentdirectorIssue relating to the director componentinternalInternal code improvements, not user-facingoriginIssue relating to the origin componentregistryIssue relating to the registry component

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions