Last active
June 26, 2025 20:42
-
-
Save aaron-prindle/d831cfa6dce6a7d072f7449d76f433e9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parts := strings.Split(rsName, "-") | |
if len(parts) < 2 { | |
t.Errorf("ReplicaSet name should contain at least one hyphen separator") | |
} | |
deploymentPortion := strings.Join(parts[:len(parts)-1], "-") | |
if len(test.deploymentName) <= 242 { | |
if deploymentPortion != test.deploymentName { | |
t.Errorf("Deployment name portion mismatch: got %q, want %q", deploymentPortion, test.deploymentName) | |
} | |
} else { | |
if len(deploymentPortion) != 242 { | |
t.Errorf("Truncated deployment name should be 242 chars, got %d", len(deploymentPortion)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment